From 90f7fca1940a1779426f979f0afe72ae9905fd30 Mon Sep 17 00:00:00 2001 From: Oliver Breitwieser Date: Fri, 27 Jul 2018 00:50:00 +0200 Subject: py-numpy: Add CPATH in modulefile (#8466) Also fix setup_dependent_package to include the ".egg-less"-include path. Change-Id: I06e66a505ece25cba8896f47e69a5be374bac6d2 --- var/spack/repos/builtin/packages/py-numpy/package.py | 14 +++++++++++--- 1 file 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: -- cgit v1.2.3-70-g09d2