diff options
author | Erik Schnetter <schnetter@gmail.com> | 2017-05-10 11:10:53 -0400 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2017-05-10 10:10:53 -0500 |
commit | e4538658591c85fd86acdf3e62c12db564240c16 (patch) | |
tree | 451f227d0e3d24bf12ab1c487464492a666d76fb | |
parent | 28c7d15df863a337ab17ee7248d2420e9979ea55 (diff) | |
download | spack-e4538658591c85fd86acdf3e62c12db564240c16.tar.gz spack-e4538658591c85fd86acdf3e62c12db564240c16.tar.bz2 spack-e4538658591c85fd86acdf3e62c12db564240c16.tar.xz spack-e4538658591c85fd86acdf3e62c12db564240c16.zip |
cosmomc: Enable Python bindings (#4169)
* cosmomc: Enable Python bindings
* cosmomc: Make python dependency optional
-rw-r--r-- | var/spack/repos/builtin/packages/cosmomc/package.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/cosmomc/package.py b/var/spack/repos/builtin/packages/cosmomc/package.py index 6c41002079..e04965b25c 100644 --- a/var/spack/repos/builtin/packages/cosmomc/package.py +++ b/var/spack/repos/builtin/packages/cosmomc/package.py @@ -50,13 +50,21 @@ class Cosmomc(Package): variant('mpi', default=True, description='Enable MPI support') variant('planck', default=False, description='Enable Planck Likelihood code and baseline data') + variant('python', default=True, description='Enable Python bindings') - patch('Makefile.patch') - patch('errorstop.patch') + extends('python', when='+python') depends_on('mpi', when='+mpi') depends_on('planck-likelihood', when='+planck') - depends_on('python@2.7:2.8,3.4:') + depends_on('py-matplotlib', type=('build', 'run'), when='+python') + depends_on('py-numpy', type=('build', 'run'), when='+python') + depends_on('py-pandas', type=('build', 'run'), when='+python') + depends_on('py-scipy', type=('build', 'run'), when='+python') + depends_on('py-six', type=('build', 'run'), when='+python') + depends_on('python @2.7:2.999,3.4:', type=('build', 'run'), when='+python') + + patch('Makefile.patch') + patch('errorstop.patch') parallel = False @@ -141,7 +149,6 @@ class Cosmomc(Package): 'paramnames', 'params_generic.ini', 'planck_covmats', - 'python', 'scripts', # don't copy 'source' 'test.ini', @@ -149,6 +156,8 @@ class Cosmomc(Package): 'test_planck.ini', 'tests', ] + if '+python' in spec: + entries += ['python'] for entry in entries: if os.path.isfile(entry): install(entry, root) |