summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMatthew Scott Krafczyk <krafczyk.matthew@gmail.com>2017-02-07 15:15:02 -0600
committerTodd Gamblin <tgamblin@llnl.gov>2017-02-07 13:15:02 -0800
commitf71df7bda3c4364ba6acd20411e8acac1c8f754c (patch)
tree362479c8c26c671e73f9ac3b07dba7d5fb52fc42 /var
parent88e9bb586e85e1793f1b42d4c99883d638358c53 (diff)
downloadspack-f71df7bda3c4364ba6acd20411e8acac1c8f754c.tar.gz
spack-f71df7bda3c4364ba6acd20411e8acac1c8f754c.tar.bz2
spack-f71df7bda3c4364ba6acd20411e8acac1c8f754c.tar.xz
spack-f71df7bda3c4364ba6acd20411e8acac1c8f754c.zip
move rpath from ALL to other sections of site.cfg (#3028)
* move rpath from ALL to other sections of site.cfg. Solves #3007 * Add back mac condition to py-numpy * Refactor py-numpy a bit.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-numpy/package.py34
1 files changed, 14 insertions, 20 deletions
diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py
index a48f5a1955..182616232e 100644
--- a/var/spack/repos/builtin/packages/py-numpy/package.py
+++ b/var/spack/repos/builtin/packages/py-numpy/package.py
@@ -82,29 +82,12 @@ class PyNumpy(PythonPackage):
# differently.
names = ','.join(lapackblas.names)
dirs = ':'.join(lapackblas.directories)
- # First, workout the defaults.
- # The section title for the defaults changed in @1.10, see
- # https://github.com/numpy/numpy/blob/master/site.cfg.example
- if spec.satisfies('@:1.9.2'):
- f.write('[DEFAULT]\n')
- else:
- f.write('[ALL]\n')
- if not ('^openblas' in spec or
- '^mkl' in spec or
- '^atlas' in spec):
- f.write('libraries=%s\n' % names)
- f.write('library_dirs=%s\n' % dirs)
-
- if not ((platform.system() == "Darwin") and
- (platform.mac_ver()[0] == '10.12')):
- f.write('rpath=%s\n' % ':'.join(lapackblas.directories))
- # Now special treatment for some (!) BLAS/LAPACK. Note that
+ # Special treatment for some (!) BLAS/LAPACK. Note that
# in this case library_dirs can not be specified within [ALL].
if '^openblas' in spec:
f.write('[openblas]\n')
f.write('libraries=%s\n' % names)
- f.write('library_dirs=%s\n' % dirs)
elif '^mkl' in spec:
# numpy does not expect system libraries needed for MKL
# here.
@@ -123,8 +106,19 @@ class PyNumpy(PythonPackage):
# and using LD_LIBRARY_PATH throughout Spack.
f.write('[mkl]\n')
f.write('mkl_libs=%s\n' % 'mkl_rt')
- f.write('library_dirs=%s\n' % dirs)
elif '^atlas' in spec:
f.write('[atlas]\n')
f.write('atlas_libs=%s\n' % names)
- f.write('library_dirs=%s\n' % dirs)
+ else:
+ # The section title for the defaults changed in @1.10, see
+ # https://github.com/numpy/numpy/blob/master/site.cfg.example
+ if spec.satisfies('@:1.9.2'):
+ f.write('[DEFAULT]\n')
+ else:
+ f.write('[ALL]\n')
+ f.write('libraries=%s\n' % names)
+
+ f.write('library_dirs=%s\n' % dirs)
+ if not ((platform.system() == "Darwin") and
+ (platform.mac_ver()[0] == '10.12')):
+ f.write('rpath=%s\n' % dirs)