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.
This commit is contained in:
Denis Davydov 2016-12-26 04:24:56 +01:00 committed by Todd Gamblin
parent e16908b16b
commit 91bfebbed8
2 changed files with 6 additions and 2 deletions

View File

@ -64,11 +64,14 @@ def test_filter_system_paths(self):
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',

View File

@ -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]