diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2020-04-25 15:43:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-25 15:43:14 -0500 |
commit | 4cd537f6c7153675fde2ce0bb66a2fb9e9fc0a9a (patch) | |
tree | 94f03dba4ca9fd62dcfacc289bb4e84546611774 | |
parent | b5be99cdb74490fc0619b52d4c358a1bba64172d (diff) | |
download | spack-4cd537f6c7153675fde2ce0bb66a2fb9e9fc0a9a.tar.gz spack-4cd537f6c7153675fde2ce0bb66a2fb9e9fc0a9a.tar.bz2 spack-4cd537f6c7153675fde2ce0bb66a2fb9e9fc0a9a.tar.xz spack-4cd537f6c7153675fde2ce0bb66a2fb9e9fc0a9a.zip |
py-pyyaml: add new version and variant (#16301)
-rw-r--r-- | var/spack/repos/builtin/packages/py-pyyaml/package.py | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/py-pyyaml/package.py b/var/spack/repos/builtin/packages/py-pyyaml/package.py index d7a08ca1b8..2b00de2d9b 100644 --- a/var/spack/repos/builtin/packages/py-pyyaml/package.py +++ b/var/spack/repos/builtin/packages/py-pyyaml/package.py @@ -9,14 +9,28 @@ from spack import * class PyPyyaml(PythonPackage): """PyYAML is a YAML parser and emitter for Python.""" - homepage = "http://pyyaml.org/wiki/PyYAML" - url = "https://pypi.io/packages/source/P/PyYAML/PyYAML-5.1.2.tar.gz" + homepage = "https://pyyaml.org/wiki/PyYAML" + url = "https://pypi.io/packages/source/P/PyYAML/PyYAML-5.3.1.tar.gz" + version('5.3.1', sha256='b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d') version('5.1.2', sha256='01adf0b6c6f61bd11af6e10ca52b7d4057dd0be0343eb9283c878cf3af56aee4') version('5.1', sha256='436bc774ecf7c103814098159fbb84c2715d25980175292c648f2da143909f95') version('3.13', sha256='3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf') version('3.12', sha256='592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab') version('3.11', sha256='c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8') - depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) - depends_on('libyaml') + variant('libyaml', default=True, description='Use libYAML bindings') + + depends_on('python@2.7:2.8,3.5:', type=('build', 'run')) + depends_on('libyaml', when='+libyaml') + + def setup_py(self, *args, **kwargs): + # Cast from tuple to list + args = list(args) + + if '+libyaml' in self.spec: + args.insert(0, '--with-libyaml') + else: + args.insert(0, '--without-libyaml') + + super(PyPyyaml, self).setup_py(*args, **kwargs) |