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
This commit is contained in:
parent
f685d538d8
commit
d1d5f5f9e7
@ -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")
|
||||
|
@ -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')
|
||||
|
@ -9,11 +9,16 @@
|
||||
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')
|
||||
|
Loading…
Reference in New Issue
Block a user