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:
Adam J. Stewart
2020-02-07 11:20:19 -06:00
committed by GitHub
parent f685d538d8
commit d1d5f5f9e7
3 changed files with 47 additions and 5 deletions

View File

@@ -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')