diff mbox

[PATCHv1,03/26] pkg-python: also pass PYTHONPATH when building distutils packages

Message ID 1392324555-29246-4-git-send-email-thomas.petazzoni@free-electrons.com
State Accepted
Commit 577e52ac087a1a3c63837d0da37c93949c455941
Headers show

Commit Message

Thomas Petazzoni Feb. 13, 2014, 8:48 p.m. UTC
With the upcoming bump of Python 2.x, it will become important that
the PYTHONPATH is passed whenever we build third-party packages, be
they using the distutils build mechanism, or the setuptools build
mechanism. This is because passing PYTHONPATH is what will allow
Python to find a special Python module that contains all the
compiler/library/headers definitions that are relevant when
cross-compiling.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/pkg-python.mk | 1 +
 1 file changed, 1 insertion(+)

Comments

Peter Korsgaard Feb. 14, 2014, 8:58 p.m. UTC | #1
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > With the upcoming bump of Python 2.x, it will become important that
 > the PYTHONPATH is passed whenever we build third-party packages, be
 > they using the distutils build mechanism, or the setuptools build
 > mechanism. This is because passing PYTHONPATH is what will allow
 > Python to find a special Python module that contains all the
 > compiler/library/headers definitions that are relevant when
 > cross-compiling.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed to next, thanks.
diff mbox

Patch

diff --git a/package/pkg-python.mk b/package/pkg-python.mk
index 2153534..b4de56d 100644
--- a/package/pkg-python.mk
+++ b/package/pkg-python.mk
@@ -28,6 +28,7 @@  PKG_PYTHON_DISTUTILS_ENV = \
 	LDFLAGS="$(TARGET_LDFLAGS)" \
 	LDSHARED="$(TARGET_CROSS)gcc -shared" \
 	CROSS_COMPILING=yes \
+	PYTHONPATH="$(PYTHON_PATH)" \
 	_python_sysroot=$(STAGING_DIR) \
 	_python_prefix=/usr \
 	_python_exec_prefix=/usr