diff --git a/package/pkg-python.mk b/package/pkg-python.mk index bf0649fc9c..02df061a19 100644 --- a/package/pkg-python.mk +++ b/package/pkg-python.mk @@ -20,6 +20,13 @@ # ################################################################################ +ifeq ($(BR2_arm)$(BR2_armeb),y) +PKG_PYTHON_ARCH = arm +else +PKG_PYTHON_ARCH = $(ARCH) +endif +PKG_PYTHON_HOST_PLATFORM = linux-$(PKG_PYTHON_ARCH) + # basename does not evaluate if a file exists, so we must check to ensure # the _sysconfigdata__linux_*.py file exists. The "|| true" is added to return # an empty string if the file does not exist. @@ -33,6 +40,7 @@ PKG_PYTHON_DISTUTILS_ENV = \ LDSHARED="$(TARGET_CROSS)gcc -shared" \ PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \ PYTHONNOUSERSITE=1 \ + _PYTHON_HOST_PLATFORM="$(PKG_PYTHON_HOST_PLATFORM)" \ _PYTHON_PROJECT_BASE="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_DIR),$(PYTHON_DIR))" \ _PYTHON_SYSCONFIGDATA_NAME="$(PKG_PYTHON_SYSCONFIGDATA_NAME)" \ _python_sysroot=$(STAGING_DIR) \ @@ -61,6 +69,7 @@ HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPTS = \ # Target setuptools-based packages PKG_PYTHON_SETUPTOOLS_ENV = \ + _PYTHON_HOST_PLATFORM="$(PKG_PYTHON_HOST_PLATFORM)" \ _PYTHON_PROJECT_BASE="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_DIR),$(PYTHON_DIR))" \ _PYTHON_SYSCONFIGDATA_NAME="$(PKG_PYTHON_SYSCONFIGDATA_NAME)" \ PATH=$(BR_PATH) \