Skip to content
Snippets Groups Projects
Commit 91bfebbe authored by Denis Davydov's avatar Denis Davydov Committed by Todd Gamblin
Browse files

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.
parent e16908b1
No related branches found
No related tags found
No related merge requests found
...@@ -64,11 +64,14 @@ def test_filter_system_paths(self): ...@@ -64,11 +64,14 @@ def test_filter_system_paths(self):
filtered = filter_system_paths([ filtered = filter_system_paths([
'/usr/local/Cellar/gcc/5.3.0/lib', '/usr/local/Cellar/gcc/5.3.0/lib',
'/usr/local/lib', '/usr/local/lib',
'/usr/local',
'/usr/local/include', '/usr/local/include',
'/usr/local/lib64', '/usr/local/lib64',
'/usr/local/opt/some-package/lib', '/usr/local/opt/some-package/lib',
'/usr/opt/lib', '/usr/opt/lib',
'/lib', '/lib',
'/',
'/usr',
'/lib64', '/lib64',
'/include', '/include',
'/opt/some-package/include', '/opt/some-package/include',
......
...@@ -24,9 +24,10 @@ ...@@ -24,9 +24,10 @@
############################################################################## ##############################################################################
import os import os
system_paths = ['/', '/usr/', '/usr/local'] system_paths = ['/', '/usr', '/usr/local']
suffixes = ['lib', 'lib64', 'include'] 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] system_bins = [os.path.join(p, 'bin') for p in system_paths]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment