summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2020-02-07 11:20:19 -0600
committerGitHub <noreply@github.com>2020-02-07 11:20:19 -0600
commitd1d5f5f9e750595372bfe44bf15b71d6f8d523bc (patch)
treee47c0b6771fb459805d685ebf590cbfce550792c /var
parentf685d538d80b20bd66bb833bbb44f001507f8192 (diff)
downloadspack-d1d5f5f9e750595372bfe44bf15b71d6f8d523bc.tar.gz
spack-d1d5f5f9e750595372bfe44bf15b71d6f8d523bc.tar.bz2
spack-d1d5f5f9e750595372bfe44bf15b71d6f8d523bc.tar.xz
spack-d1d5f5f9e750595372bfe44bf15b71d6f8d523bc.zip
patch aws-parallelcluster so that it doesn't require enum34 (#14796)
* aws-parallelcluster always depends on enum34 * Build aws-parallelcluster without enum34 * Update homepage * Add unit tests
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/aws-parallelcluster/enum34.patch17
-rw-r--r--var/spack/repos/builtin/packages/aws-parallelcluster/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-enum34/package.py9
3 files changed, 47 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/aws-parallelcluster/enum34.patch b/var/spack/repos/builtin/packages/aws-parallelcluster/enum34.patch
new file mode 100644
index 0000000000..c96a5c2d41
--- /dev/null
+++ b/var/spack/repos/builtin/packages/aws-parallelcluster/enum34.patch
@@ -0,0 +1,17 @@
+diff -Naur a/setup.py b/setup.py
+--- a/setup.py 2020-02-06 15:40:26.000000000 -0600
++++ b/setup.py 2020-02-06 15:41:17.000000000 -0600
+@@ -27,10 +27,12 @@
+ "future>=0.16.0,<=0.18.2",
+ "tabulate>=0.8.2,<=0.8.3",
+ "ipaddress>=1.0.22",
+- "enum34>=1.1.6",
+ "PyYAML>=5.1.2",
+ ]
+
++if sys.version_info < (3, 4):
++ REQUIRES.append("enum34>=1.1.6")
++
+ if sys.version_info[0] == 2:
+ REQUIRES.append("configparser>=3.5.0,<=3.8.1")
+
diff --git a/var/spack/repos/builtin/packages/aws-parallelcluster/package.py b/var/spack/repos/builtin/packages/aws-parallelcluster/package.py
index 6fd95ac2ee..9a0bb4a9cc 100644
--- a/var/spack/repos/builtin/packages/aws-parallelcluster/package.py
+++ b/var/spack/repos/builtin/packages/aws-parallelcluster/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
+import os
class AwsParallelcluster(PythonPackage):
@@ -12,14 +13,21 @@ class AwsParallelcluster(PythonPackage):
homepage = "https://github.com/aws/aws-parallelcluster"
url = "https://pypi.io/packages/source/a/aws-parallelcluster/aws-parallelcluster-2.5.1.tar.gz"
- maintainers = ['sean-smith', 'demartinofra', 'enrico-usai',
- 'lukeseawalker', 'rexcsn', 'ddeidda', 'tilne']
+
+ maintainers = [
+ 'sean-smith', 'demartinofra', 'enrico-usai', 'lukeseawalker', 'rexcsn',
+ 'ddeidda', 'tilne'
+ ]
+ import_modules = [
+ 'pcluster', 'awsbatch', 'pcluster.dcv', 'pcluster.configure',
+ 'pcluster.config', 'pcluster.networking'
+ ]
version('2.5.1', sha256='4fd6e14583f8cf81f9e4aa1d6188e3708d3d14e6ae252de0a94caaf58be76303')
version('2.5.0', sha256='3b0209342ea0d9d8cc95505456103ad87c2d4e35771aa838765918194efd0ad3')
depends_on('python@2.7:', type=('build', 'run'))
- depends_on('py-setuptools', type='build')
+ depends_on('py-setuptools', type=('build', 'run'))
depends_on('py-boto3@1.10.15:', type=('build', 'run'))
depends_on('py-future@0.16.0:0.18.2', type=('build', 'run'))
depends_on('py-tabulate@0.8.2:0.8.3', type=('build', 'run'))
@@ -27,3 +35,15 @@ class AwsParallelcluster(PythonPackage):
depends_on('py-enum34@1.1.6:', when='^python@:3.3', type=('build', 'run'))
depends_on('py-pyyaml@5.1.2:', type=('build', 'run'))
depends_on('py-configparser@3.5.0:3.8.1', when='^python@:2', type=('build', 'run'))
+
+ # https://github.com/aws/aws-parallelcluster/pull/1633
+ patch('enum34.patch', when='@:2.5.1')
+
+ @run_after('install')
+ @on_package_attributes(run_tests=True)
+ def install_test(self):
+ # Make sure executables work
+ for exe in ['awsbhosts', 'awsbkill', 'awsbout', 'awsbqueues',
+ 'awsbstat', 'awsbsub', 'pcluster']:
+ exe = Executable(os.path.join(self.prefix.bin, exe))
+ exe('--help')
diff --git a/var/spack/repos/builtin/packages/py-enum34/package.py b/var/spack/repos/builtin/packages/py-enum34/package.py
index 0de579afb7..7bcdf462b3 100644
--- a/var/spack/repos/builtin/packages/py-enum34/package.py
+++ b/var/spack/repos/builtin/packages/py-enum34/package.py
@@ -9,11 +9,16 @@ from spack import *
class PyEnum34(PythonPackage):
"""Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4."""
- homepage = "https://pypi.python.org/pypi/enum34"
+ homepage = "https://bitbucket.org/stoneleaf/enum34/src"
url = "https://pypi.io/packages/source/e/enum34/enum34-1.1.6.tar.gz"
version('1.1.6', sha256='8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1')
- depends_on('python')
+ # enum34 is a backport of the enum library from Python 3.4. It is not
+ # intended to be used with Python 3.4+. In fact, it won't build at all
+ # for Python 3.6+, as new constructs were added to the builtin enum
+ # library that aren't present in enum34. See:
+ # https://bitbucket.org/stoneleaf/enum34/issues/19
+ depends_on('python@:3.5', type=('build', 'run'))
depends_on('py-ordereddict', when='^python@:2.6', type=('build', 'run'))
depends_on('py-setuptools', type='build')