parent
620d728aa5
commit
c96d687c7c
@ -201,15 +201,18 @@ def build_args(self, spec, prefix):
|
|||||||
return args
|
return args
|
||||||
|
|
||||||
def setup_environment(self, spack_env, run_env):
|
def setup_environment(self, spack_env, run_env):
|
||||||
python_version = self.spec['python'].version.up_to(2)
|
# If py-numpy is installed as an external package, python won't
|
||||||
|
# be available in the spec. See #9149 for details.
|
||||||
|
if 'python' in self.spec:
|
||||||
|
python_version = self.spec['python'].version.up_to(2)
|
||||||
|
|
||||||
include_path = join_path(
|
include_path = join_path(
|
||||||
self.prefix.lib,
|
self.prefix.lib,
|
||||||
'python{0}'.format(python_version),
|
'python{0}'.format(python_version),
|
||||||
'site-packages',
|
'site-packages',
|
||||||
'numpy/core/include')
|
'numpy/core/include')
|
||||||
|
|
||||||
run_env.prepend_path('CPATH', include_path)
|
run_env.prepend_path('CPATH', include_path)
|
||||||
|
|
||||||
def test(self):
|
def test(self):
|
||||||
# `setup.py test` is not supported. Use one of the following
|
# `setup.py test` is not supported. Use one of the following
|
||||||
|
Loading…
Reference in New Issue
Block a user