diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/py-pyyaml/package.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/py-pyyaml/package.py b/var/spack/repos/builtin/packages/py-pyyaml/package.py index 1c5e7d02eb..b68af04549 100644 --- a/var/spack/repos/builtin/packages/py-pyyaml/package.py +++ b/var/spack/repos/builtin/packages/py-pyyaml/package.py @@ -15,6 +15,7 @@ class PyPyyaml(PythonPackage): maintainers = ['adamjstewart'] + version('6.0', sha256='68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2') version('5.3.1', sha256='b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d') version('5.1.2', sha256='01adf0b6c6f61bd11af6e10ca52b7d4057dd0be0343eb9283c878cf3af56aee4') version('5.1', sha256='436bc774ecf7c103814098159fbb84c2715d25980175292c648f2da143909f95') @@ -25,7 +26,10 @@ class PyPyyaml(PythonPackage): variant('libyaml', default=True, description='Use libYAML bindings') depends_on('python@2.7:2.8,3.5:', type=('build', 'run')) + depends_on('python@3.6:', type=('build', 'run'), when='@6.0:') depends_on('libyaml', when='+libyaml') + depends_on('py-setuptools', when='@6.0:') + depends_on('py-cython', when='@6.0: +libyaml') phases = ['build_ext', 'install'] @@ -39,20 +43,21 @@ class PyPyyaml(PythonPackage): return modules def setup_py(self, *args, **kwargs): - # Cast from tuple to list - args = list(args) + if self.spec.satisfies('@:5'): + # Cast from tuple to list + args = list(args) - if '+libyaml' in self.spec: - args.insert(0, '--with-libyaml') - else: - args.insert(0, '--without-libyaml') + if '+libyaml' in self.spec: + args.insert(0, '--with-libyaml') + else: + args.insert(0, '--without-libyaml') super(PyPyyaml, self).setup_py(*args, **kwargs) def build_ext_args(self, spec, prefix): args = [] - if '+libyaml' in spec: + if spec.satisfies('@:5 +libyaml'): args.extend([ spec['libyaml'].libs.search_flags, spec['libyaml'].headers.include_flags, |