cosmomc: Enable Python bindings (#4169)
* cosmomc: Enable Python bindings * cosmomc: Make python dependency optional
This commit is contained in:
parent
28c7d15df8
commit
e453865859
@ -50,13 +50,21 @@ def url_for_version(self, version):
|
|||||||
variant('mpi', default=True, description='Enable MPI support')
|
variant('mpi', default=True, description='Enable MPI support')
|
||||||
variant('planck', default=False,
|
variant('planck', default=False,
|
||||||
description='Enable Planck Likelihood code and baseline data')
|
description='Enable Planck Likelihood code and baseline data')
|
||||||
|
variant('python', default=True, description='Enable Python bindings')
|
||||||
|
|
||||||
patch('Makefile.patch')
|
extends('python', when='+python')
|
||||||
patch('errorstop.patch')
|
|
||||||
|
|
||||||
depends_on('mpi', when='+mpi')
|
depends_on('mpi', when='+mpi')
|
||||||
depends_on('planck-likelihood', when='+planck')
|
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
|
parallel = False
|
||||||
|
|
||||||
@ -141,7 +149,6 @@ def install(self, spec, prefix):
|
|||||||
'paramnames',
|
'paramnames',
|
||||||
'params_generic.ini',
|
'params_generic.ini',
|
||||||
'planck_covmats',
|
'planck_covmats',
|
||||||
'python',
|
|
||||||
'scripts',
|
'scripts',
|
||||||
# don't copy 'source'
|
# don't copy 'source'
|
||||||
'test.ini',
|
'test.ini',
|
||||||
@ -149,6 +156,8 @@ def install(self, spec, prefix):
|
|||||||
'test_planck.ini',
|
'test_planck.ini',
|
||||||
'tests',
|
'tests',
|
||||||
]
|
]
|
||||||
|
if '+python' in spec:
|
||||||
|
entries += ['python']
|
||||||
for entry in entries:
|
for entry in entries:
|
||||||
if os.path.isfile(entry):
|
if os.path.isfile(entry):
|
||||||
install(entry, root)
|
install(entry, root)
|
||||||
|
Loading…
Reference in New Issue
Block a user