Skip to content

Commit 6166709

Browse files
committed
Issue #17990: Only modify include and library search paths when cross-compiling.
1 parent 9855249 commit 6166709

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

setup.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,11 @@ def add_gcc_paths(self):
437437

438438
def detect_modules(self):
439439
# Ensure that /usr/local is always used
440-
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
441-
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
442-
self.add_gcc_paths()
440+
if not cross_compiling:
441+
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
442+
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
443+
if cross_compiling:
444+
self.add_gcc_paths()
443445
self.add_multiarch_paths()
444446

445447
# Add paths specified in the environment variables LDFLAGS and

0 commit comments

Comments
 (0)