From 9aacbc5569efe763fb525f63229ee5e07bcae535 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 10 Jan 2014 06:58:26 +0800 Subject: [PATCH] Change the install location of _sysconfigdata.py The _sysconfigdata.py module contains definitions that are needed when building Python modules. In cross-compilation mode, when building Python extensions for the target, we need to use the _sysconfigdata.py of the target Python while executing the host Python. However until now, the _sysconfigdata.py module was installed in build/lib.- directory, together with a number of architecture-specific shared objects, which cannot be used with the host Python. To solve this problem, this patch moves _sysconfigdata.py to a separate location, build/sysconfigdata.-/, and only this directory gets added to the PYTHONPATH of the host Python interpreter when building Python modules for the target. Signed-off-by: Thomas Petazzoni --- Lib/sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index dbf7767..e3e1793 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -388,7 +388,7 @@ def _generate_posix_vars(): module.build_time_vars = vars sys.modules[name] = module - pybuilddir = 'build/lib.%s-%s' % (get_platform(), sys.version[:3]) + pybuilddir = 'build/sysconfidata.%s-%s' % (get_platform(), sys.version[:3]) if hasattr(sys, "gettotalrefcount"): pybuilddir += '-pydebug' os.makedirs(pybuilddir, exist_ok=True) -- 1.8.3.2