py-numpy: make blas/lapack optional dependencies
OS X is having trouble building these libraries, so make them optional dependencies.
This commit is contained in:
parent
f6680a0051
commit
c3bf1a7741
@ -8,14 +8,17 @@ class PyNumpy(Package):
|
|||||||
version('1.9.1', '78842b73560ec378142665e712ae4ad9')
|
version('1.9.1', '78842b73560ec378142665e712ae4ad9')
|
||||||
version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645')
|
version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645')
|
||||||
|
|
||||||
|
variant('blas', default=True)
|
||||||
|
|
||||||
extends('python')
|
extends('python')
|
||||||
depends_on('py-nose')
|
depends_on('py-nose')
|
||||||
depends_on('netlib-blas+fpic')
|
depends_on('netlib-blas+fpic', when='+blas')
|
||||||
depends_on('netlib-lapack+shared')
|
depends_on('netlib-lapack+shared', when='+blas')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
with open('site.cfg', 'w') as f:
|
if '+blas' in spec:
|
||||||
f.write('[DEFAULT]\n')
|
with open('site.cfg', 'w') as f:
|
||||||
f.write('libraries=lapack,blas\n')
|
f.write('[DEFAULT]\n')
|
||||||
f.write('library_dirs=%s/lib:%s/lib\n' % (spec['blas'].prefix, spec['lapack'].prefix))
|
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)
|
python('setup.py', 'install', '--prefix=%s' % prefix)
|
||||||
|
Loading…
Reference in New Issue
Block a user