diff options
Diffstat (limited to 'var/spack/packages/py-numpy/package.py')
-rw-r--r-- | var/spack/packages/py-numpy/package.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/var/spack/packages/py-numpy/package.py b/var/spack/packages/py-numpy/package.py index 4c085fba6e..0354811186 100644 --- a/var/spack/packages/py-numpy/package.py +++ b/var/spack/packages/py-numpy/package.py @@ -7,15 +7,18 @@ class PyNumpy(Package): version('1.9.1', '78842b73560ec378142665e712ae4ad9') version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645') - + + variant('blas', default=True) + extends('python') depends_on('py-nose') - depends_on('netlib-blas+fpic') - depends_on('netlib-lapack+shared') + depends_on('netlib-blas+fpic', when='+blas') + depends_on('netlib-lapack+shared', when='+blas') def install(self, spec, prefix): - with open('site.cfg', 'w') as f: - f.write('[DEFAULT]\n') - f.write('libraries=lapack,blas\n') - f.write('library_dirs=%s/lib:%s/lib\n' % (spec['blas'].prefix, spec['lapack'].prefix)) + if '+blas' in spec: + with open('site.cfg', 'w') as f: + f.write('[DEFAULT]\n') + f.write('libraries=lapack,blas\n') + f.write('library_dirs=%s/lib:%s/lib\n' % (spec['blas'].prefix, spec['lapack'].prefix)) python('setup.py', 'install', '--prefix=%s' % prefix) |