summaryrefslogtreecommitdiff
path: root/package/pkg-python.mk
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2013-12-22 18:02:10 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2013-12-26 23:31:32 +0100
commitb07b9d181ddea2282d8f6018b2f8b808439f67ca (patch)
tree50e8cc8f925ea511dd616acb1b27faf9f99b888f /package/pkg-python.mk
parentd9ddd28bb1247f4b9e2ee6557c27f8739cc58d14 (diff)
python: fix invalid library paths leaking into the build, and other improvements
This commit improves the cross-compilation patches we have on top of Python, to fix the problem of host library paths leaking into the build of target modules, as seen at: http://autobuild.buildroot.org/results/fcc/fccd7e08cd9d4713eb4208097dd48c5ab25749bc/build-end.log http://autobuild.buildroot.org/results/0bd/0bda780bf4b759b12edec26ac20b88cde617db4d/build-end.log To do so, it ensures that the right python2.7/config/Makefile is used when building target modules, and adjusts at runtime the paths read from this Makefile if we are cross-compiling. In addition, it installs the pgen program into the host directory, and points the target python build to use python and pgen from $(HOST_DIR) instead of from the host python source directory, which looks cleaner. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/pkg-python.mk')
-rw-r--r--package/pkg-python.mk7
1 files changed, 5 insertions, 2 deletions
diff --git a/package/pkg-python.mk b/package/pkg-python.mk
index 5f137d58f..79e6bcfa6 100644
--- a/package/pkg-python.mk
+++ b/package/pkg-python.mk
@@ -29,7 +29,6 @@ PKG_PYTHON_DISTUTILS_ENV = \
LDSHARED="$(TARGET_CROSS)gcc -shared" \
CROSS_COMPILING=yes \
_python_sysroot=$(STAGING_DIR) \
- _python_srcdir=$(PYTHON_DIR) \
_python_prefix=/usr \
_python_exec_prefix=/usr
@@ -50,7 +49,11 @@ HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPT = \
PKG_PYTHON_SETUPTOOLS_ENV = \
PATH="$(TARGET_PATH)" \
PYTHONPATH="$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" \
- PYTHONXCPREFIX="$(STAGING_DIR)/usr/"
+ PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \
+ CROSS_COMPILING=yes \
+ _python_sysroot=$(STAGING_DIR) \
+ _python_prefix=/usr \
+ _python_exec_prefix=/usr
PKG_PYTHON_SETUPTOOLS_INSTALL_OPT = \
--prefix=$(TARGET_DIR)/usr \