Commit | Line | Data |
---|---|---|
2073b55e | 1 | Make sure the build system honors C_INCLUDE_PATH and LIBRARY_PATH when |
a2ab82db | 2 | looking for headers and libraries. |
6a20289d LC |
3 | |
4 | --- Python-2.7.10/setup.py 2015-10-07 18:33:18.125153186 +0200 | |
5 | +++ Python-2.7.10/setup.py 2015-10-07 18:33:47.497347552 +0200 | |
ceb9de75 | 6 | @@ -526,6 +526,14 @@ class PyBuildExt(build_ext): |
6a20289d LC |
7 | inc_dirs += ['/system/include', '/atheos/autolnk/include'] |
8 | inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep) | |
9 | ||
10 | + # Always honor these variables. | |
ceb9de75 MO |
11 | + if not cross_compiling: |
12 | + lib_dirs += os.getenv('LIBRARY_PATH', '').split(os.pathsep) | |
2073b55e | 13 | + inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep) |
ceb9de75 MO |
14 | + else: |
15 | + lib_dirs = os.getenv('CROSS_LIBRARY_PATH', '').split(os.pathsep) | |
16 | + inc_dirs = os.getenv('CROSS_CPATH', '').split(os.pathsep) | |
6a20289d LC |
17 | + |
18 | # OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb) | |
19 | if host_platform in ['osf1', 'unixware7', 'openunix8']: | |
20 | lib_dirs += ['/usr/ccs/lib'] |