From: Xavier de Gaye Date: Wed, 14 Dec 2016 10:14:33 +0000 (+0100) Subject: Issue #20211: Do not add the directory for installing C header files and X-Git-Tag: v3.6.1rc1~315 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1351c31aa9651b278d7ef8ec79af3b646a520235;p=thirdparty%2FPython%2Fcpython.git Issue #20211: Do not add the directory for installing C header files and the directory for installing object code libraries to the cross compilation search paths. --- diff --git a/Misc/NEWS b/Misc/NEWS index f4433daf8035..97502a999b0d 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -53,6 +53,10 @@ Tests Build ----- +- Issue #20211: Do not add the directory for installing C header files and the + directory for installing object code libraries to the cross compilation + search paths. Original patch by Thomas Petazzoni. + - Issue #28849: Do not define sys.implementation._multiarch on Android. diff --git a/setup.py b/setup.py index 7cb1141dac79..d218722e0e66 100644 --- a/setup.py +++ b/setup.py @@ -532,8 +532,9 @@ class PyBuildExt(build_ext): for directory in reversed(options.dirs): add_dir_to_list(dir_list, directory) - if os.path.normpath(sys.base_prefix) != '/usr' \ - and not sysconfig.get_config_var('PYTHONFRAMEWORK'): + if (not cross_compiling and + os.path.normpath(sys.base_prefix) != '/usr' and + not sysconfig.get_config_var('PYTHONFRAMEWORK')): # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework # (PYTHONFRAMEWORK is set) to avoid # linking problems when # building a framework with different architectures than