diff options
author | Oliver Breitwieser <oliver.breitwieser@gmail.com> | 2018-07-27 00:50:00 +0200 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2018-07-26 17:50:00 -0500 |
commit | 90f7fca1940a1779426f979f0afe72ae9905fd30 (patch) | |
tree | 6581e268f0901eb6a607db4b3d4e582702dda78b /var | |
parent | 3494c6e403b05c4c2f097d996671c63e3ca8a0b2 (diff) | |
download | spack-90f7fca1940a1779426f979f0afe72ae9905fd30.tar.gz spack-90f7fca1940a1779426f979f0afe72ae9905fd30.tar.bz2 spack-90f7fca1940a1779426f979f0afe72ae9905fd30.tar.xz spack-90f7fca1940a1779426f979f0afe72ae9905fd30.zip |
py-numpy: Add CPATH in modulefile (#8466)
Also fix setup_dependent_package to include the ".egg-less"-include
path.
Change-Id: I06e66a505ece25cba8896f47e69a5be374bac6d2
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/py-numpy/package.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index 54af4da6ae..435491f658 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -76,14 +76,11 @@ class PyNumpy(PythonPackage): def setup_dependent_package(self, module, dependent_spec): python_version = self.spec['python'].version.up_to(2) - arch = '{0}-{1}'.format(platform.system().lower(), platform.machine()) self.spec.include = join_path( self.prefix.lib, 'python{0}'.format(python_version), 'site-packages', - 'numpy-{0}-py{1}-{2}.egg'.format( - self.spec.version, python_version, arch), 'numpy/core/include') def patch(self): @@ -158,6 +155,17 @@ class PyNumpy(PythonPackage): return args + def setup_environment(self, spack_env, run_env): + python_version = self.spec['python'].version.up_to(2) + + include_path = join_path( + self.prefix.lib, + 'python{0}'.format(python_version), + 'site-packages', + 'numpy/core/include') + + run_env.prepend_path('CPATH', include_path) + def test(self): # `setup.py test` is not supported. Use one of the following # instead: |