From: Michael Olbrich Date: Tue, 15 Sep 2015 15:33:58 +0200 Subject: [PATCH] python3: don't leak host path into cross compilation Based on a patch by Han Sirkstra Signed-off-by: Michael Olbrich --- setup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index da67731aa19f..1c3f2d09f794 100644 --- a/setup.py +++ b/setup.py @@ -511,7 +511,8 @@ class PyBuildExt(build_ext): add_dir_to_list(dir_list, directory) if os.path.normpath(sys.base_prefix) != '/usr' \ - and not sysconfig.get_config_var('PYTHONFRAMEWORK'): + and not sysconfig.get_config_var('PYTHONFRAMEWORK') \ + and not cross_compiling: # 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 @@ -1294,7 +1295,8 @@ class PyBuildExt(build_ext): panel_library = 'panel' if curses_library == 'ncursesw': curses_defines.append(('HAVE_NCURSESW', '1')) - curses_includes.append('/usr/include/ncursesw') + if not cross_compiling: + curses_includes.append('/usr/include/ncursesw') # Bug 1464056: If _curses.so links with ncursesw, # _curses_panel.so must link with panelw. panel_library = 'panelw'