python: update PYTHON_FOR_BUILD (based on python3)
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Wed, 4 Jan 2017 09:39:00 +0000 (11:39 +0200)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Wed, 4 Jan 2017 13:08:36 +0000 (15:08 +0200)
PYTHON_FOR_BUILD is used to build the target python.
Nomally Python scripts detect fine the Python host interpreter
to use for building the Python target interpreter.
But, let's not leave it up to chance anymore.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
lang/python/Makefile

index dedf8278782fa03255740c2b6a7bf28f6acb3790..c1c8f79af406d5e0af022c53b094841bd66155be 100644 (file)
@@ -122,6 +122,13 @@ ifeq ($(CONFIG_IPV6),y)
        ENABLE_IPV6 += --enable-ipv6
 endif
 
+PYTHON_FOR_BUILD:= \
+       _PYTHON_PROJECT_BASE=$(PKG_BUILD_DIR) \
+       _PYTHON_HOST_PLATFORM=linux2 \
+       PYTHONPATH="$(PKG_BUILD_DIR)/Lib:$(PKG_BUILD_DIR)/build/lib.linux2-$(PYTHON_VERSION)" \
+       _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata \
+       $(HOST_PYTHON_BIN)
+
 CONFIGURE_ARGS+= \
        --sysconfdir=/etc \
        --enable-shared \
@@ -129,6 +136,7 @@ CONFIGURE_ARGS+= \
        --with-threads \
        --with-system-ffi \
        --without-pymalloc \
+       PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \
        $(ENABLE_IPV6) \
        CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \
        OPT="$(TARGET_CFLAGS)"