From 91bfebbed8673b95c425a174a1fa16d9e8fa0fde Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 26 Dec 2016 04:24:56 +0100 Subject: filter_system_path: additionally filter system prefixes (#2672) That's because in set_build_environment_variables() the funciton filter_system_paths() is actually applied to package prefixes, and not to prefix/lib or prefix/include. --- lib/spack/spack/test/environment.py | 3 +++ lib/spack/spack/util/environment.py | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/test/environment.py b/lib/spack/spack/test/environment.py index 2b499869c5..e9f0a5182f 100644 --- a/lib/spack/spack/test/environment.py +++ b/lib/spack/spack/test/environment.py @@ -64,11 +64,14 @@ class EnvironmentTest(unittest.TestCase): filtered = filter_system_paths([ '/usr/local/Cellar/gcc/5.3.0/lib', '/usr/local/lib', + '/usr/local', '/usr/local/include', '/usr/local/lib64', '/usr/local/opt/some-package/lib', '/usr/opt/lib', '/lib', + '/', + '/usr', '/lib64', '/include', '/opt/some-package/include', diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py index 15eb52d8e2..420cce8245 100644 --- a/lib/spack/spack/util/environment.py +++ b/lib/spack/spack/util/environment.py @@ -24,9 +24,10 @@ ############################################################################## import os -system_paths = ['/', '/usr/', '/usr/local'] +system_paths = ['/', '/usr', '/usr/local'] suffixes = ['lib', 'lib64', 'include'] -system_dirs = [os.path.join(p, s) for s in suffixes for p in system_paths] +system_dirs = [os.path.join(p, s) for s in suffixes for p in system_paths] + \ + system_paths system_bins = [os.path.join(p, 'bin') for p in system_paths] -- cgit v1.2.3-70-g09d2