py-numpy: Add CPATH in modulefile (#8466)
Also fix setup_dependent_package to include the ".egg-less"-include path. Change-Id: I06e66a505ece25cba8896f47e69a5be374bac6d2
This commit is contained in:
parent
3494c6e403
commit
90f7fca194
1 changed files with 11 additions and 3 deletions
|
@ -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 @@ def build_args(self, spec, prefix):
|
|||
|
||||
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:
|
||||
|
|
Loading…
Reference in a new issue