summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/py-numpy/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-scipy/package.py13
2 files changed, 14 insertions, 19 deletions
diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py
index 0d68a892f2..8cb2331637 100644
--- a/var/spack/repos/builtin/packages/py-numpy/package.py
+++ b/var/spack/repos/builtin/packages/py-numpy/package.py
@@ -66,21 +66,21 @@ class PyNumpy(Package):
'numpy/core/include')
def install(self, spec, prefix):
- libraries = []
- library_dirs = []
+ # for build notes see http://www.scipy.org/scipylib/building/linux.html
+ lapackblas = LibraryList('')
+ if '+lapack' in spec:
+ lapackblas += spec['lapack'].lapack_libs
if '+blas' in spec:
- libraries.append('blas')
- library_dirs.append(spec['blas'].prefix.lib)
- if '+lapack' in spec:
- libraries.append('lapack')
- library_dirs.append(spec['lapack'].prefix.lib)
+ lapackblas += spec['blas'].blas_libs
if '+blas' in spec or '+lapack' in spec:
with open('site.cfg', 'w') as f:
f.write('[DEFAULT]\n')
- f.write('libraries=%s\n' % ','.join(libraries))
- f.write('library_dirs=%s\n' % ':'.join(library_dirs))
- f.write('rpath=%s\n' % ':'.join(library_dirs))
+ f.write('libraries=%s\n' % ','.join(lapackblas.names))
+ f.write('library_dirs=%s\n' % ':'.join(lapackblas.directories))
+ if not ((platform.system() == "Darwin") and
+ (platform.mac_ver()[0] == '10.12')):
+ f.write('rpath=%s\n' % ':'.join(lapackblas.directories))
setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py
index abb843f8ee..71bf83c3f0 100644
--- a/var/spack/repos/builtin/packages/py-scipy/package.py
+++ b/var/spack/repos/builtin/packages/py-scipy/package.py
@@ -45,15 +45,10 @@ class PyScipy(Package):
# Known not to work with 2.23, 2.25
depends_on('binutils@2.26:', type='build')
depends_on('py-numpy@1.7.1:+blas+lapack', type=nolink)
+ depends_on('blas')
+ depends_on('lapack')
def install(self, spec, prefix):
- if 'atlas' in spec:
- # libatlas.so actually isn't always installed, but this
- # seems to make the build autodetect things correctly.
- env['ATLAS'] = join_path(
- spec['atlas'].prefix.lib, 'libatlas.' + dso_suffix)
- else:
- env['BLAS'] = spec['blas'].blas_libs.joined()
- env['LAPACK'] = spec['lapack'].lapack_libs.joined()
-
+ # NOTE: scipy picks up Blas/Lapack from numpy, see
+ # http://www.scipy.org/scipylib/building/linux.html#step-4-build-numpy-1-5-0
setup_py('install', '--prefix={0}'.format(prefix))