changeset: 105616:d1b400943483 branch: 3.6 parent: 105610:0528a6743018 user: Xavier de Gaye date: Wed Dec 14 11:14:33 2016 +0100 files: Misc/NEWS setup.py description: 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 -r 0528a6743018 -r d1b400943483 Misc/NEWS --- a/Misc/NEWS Tue Dec 13 09:06:42 2016 -0800 +++ b/Misc/NEWS Wed Dec 14 11:14:33 2016 +0100 @@ -53,6 +53,10 @@ 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 -r 0528a6743018 -r d1b400943483 setup.py --- a/setup.py Tue Dec 13 09:06:42 2016 -0800 +++ b/setup.py Wed Dec 14 11:14:33 2016 +0100 @@ -532,8 +532,9 @@ 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