summaryrefslogtreecommitdiff
path: root/dev-lang/python/files/python-2.7.5-library-path.patch
blob: 6f435750a2097fada7544cc76f25fbad0f44f900 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# HG changeset patch
# User Ned Deily <nad@acm.org>
# Date 1368666045 25200
# Node ID cd577c3288860b0deb459443ca5c489dc0f99ef6
# Parent  149340b3004acfcb68e5ed36b1e96b7463c756c7
Issue #17990: Only modify include and library search paths when cross-compiling.

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -437,9 +437,11 @@ class PyBuildExt(build_ext):
 
     def detect_modules(self):
         # Ensure that /usr/local is always used
-        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-        self.add_gcc_paths()
+        if not cross_compiling:
+            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+        if cross_compiling:
+            self.add_gcc_paths()
         self.add_multiarch_paths()
 
         # Add paths specified in the environment variables LDFLAGS and