diff --git a/lang/python/Makefile b/lang/python/Makefile index 3235b4557..3eb4e9dad 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -151,13 +151,13 @@ define Build/InstallDev $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \ $(1)/usr/include/ $(CP) \ - $(HOST_BUILD_PREFIX)/lib/python$(PYTHON_VERSION) \ + $(HOST_PYTHON_LIB_DIR) \ $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \ $(1)/usr/lib/ $(CP) \ - $(HOST_BUILD_PREFIX)/lib/pkgconfig/python.pc \ - $(HOST_BUILD_PREFIX)/lib/pkgconfig/python2.pc \ - $(HOST_BUILD_PREFIX)/lib/pkgconfig/python-$(PYTHON_VERSION).pc \ + $(HOST_PYTHON_DIR)/lib/pkgconfig/python.pc \ + $(HOST_PYTHON_DIR)/lib/pkgconfig/python2.pc \ + $(HOST_PYTHON_DIR)/lib/pkgconfig/python-$(PYTHON_VERSION).pc \ $(1)/usr/lib/pkgconfig $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \ @@ -224,20 +224,17 @@ HOST_CONFIGURE_ARGS+= \ --without-cxx-main \ --without-pymalloc \ --with-threads \ - --prefix=$(HOST_BUILD_PREFIX) \ - --exec-prefix=$(HOST_BUILD_PREFIX) \ - --sysconfdir=$(HOST_BUILD_PREFIX)/etc \ - --localstatedir=$(HOST_BUILD_PREFIX)/var \ - --sbindir=$(HOST_BUILD_PREFIX)/bin \ - --with-system-expat=$(HOST_BUILD_PREFIX) \ - --with-system-ffi=$(HOST_BUILD_PREFIX) \ + --prefix=$(HOST_PYTHON_DIR) \ + --exec-prefix=$(HOST_PYTHON_DIR) \ + --with-system-expat=$(STAGING_DIR_HOSTPKG) \ + --with-system-ffi=$(STAGING_DIR_HOSTPKG) \ CONFIG_SITE= \ CFLAGS="$(HOST_CFLAGS)" define Host/Install $(MAKE) -C $(HOST_BUILD_DIR) install - $(INSTALL_DIR) $(HOST_BUILD_PREFIX)/bin/ - $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_BUILD_PREFIX)/bin/pgen2 + $(INSTALL_DIR) $(HOST_PYTHON_DIR)/bin/ + $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_PYTHON_DIR)/bin/pgen2 endef $(eval $(call HostBuild)) diff --git a/lang/python/files/python-host.mk b/lang/python/files/python-host.mk index 21f238fe0..dc0c0c049 100644 --- a/lang/python/files/python-host.mk +++ b/lang/python/files/python-host.mk @@ -21,11 +21,11 @@ HOST_PYTHON_DIR:=$(STAGING_DIR_HOSTPKG) HOST_PYTHON_INC_DIR:=$(HOST_PYTHON_DIR)/include/python$(PYTHON_VERSION) HOST_PYTHON_LIB_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION) -HOST_PYTHON_PKG_DIR:=/lib/python$(PYTHON_VERSION)/site-packages +HOST_PYTHON_PKG_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION)/site-packages HOST_PYTHON_BIN:=$(HOST_PYTHON_DIR)/bin/python$(PYTHON_VERSION) -HOST_PYTHONPATH:=$(HOST_PYTHON_LIB_DIR):$(STAGING_DIR_HOSTPKG)/$(HOST_PYTHON_PKG_DIR) +HOST_PYTHONPATH:=$(HOST_PYTHON_LIB_DIR):$(HOST_PYTHON_PKG_DIR) define HostPython if [ "$(strip $(3))" == "HOST" ]; then \ diff --git a/lang/python3/Makefile b/lang/python3/Makefile index c46f3bd56..2e0f872a0 100644 --- a/lang/python3/Makefile +++ b/lang/python3/Makefile @@ -146,7 +146,7 @@ define Build/InstallDev $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \ $(1)/usr/include/ $(CP) \ - $(HOST_BUILD_PREFIX)/lib/python$(PYTHON_VERSION) \ + $(HOST_PYTHON3_LIB_DIR) \ $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \ $(1)/usr/lib/ $(CP) \ @@ -212,13 +212,10 @@ HOST_CONFIGURE_ARGS+= \ --without-cxx-main \ --without-pymalloc \ --with-threads \ - --prefix=$(HOST_BUILD_PREFIX) \ - --exec-prefix=$(HOST_BUILD_PREFIX) \ - --sysconfdir=$(HOST_BUILD_PREFIX)/etc \ - --localstatedir=$(HOST_BUILD_PREFIX)/var \ - --sbindir=$(HOST_BUILD_PREFIX)/bin \ - --with-system-expat=$(HOST_BUILD_PREFIX) \ - --with-system-ffi=$(HOST_BUILD_PREFIX) \ + --prefix=$(HOST_PYTHON3_DIR) \ + --exec-prefix=$(HOST_PYTHON3_DIR) \ + --with-system-expat=$(STAGING_DIR_HOSTPKG) \ + --with-system-ffi=$(STAGING_DIR_HOSTPKG) \ --with-ensurepip=no \ CONFIG_SITE= \ CFLAGS="$(HOST_CFLAGS)" @@ -231,9 +228,9 @@ endef define Host/Install $(MAKE) -C $(HOST_BUILD_DIR) install - $(INSTALL_DIR) $(HOST_BUILD_PREFIX)/bin/ - $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_BUILD_PREFIX)/bin/pgen3 - $(INSTALL_BIN) $(HOST_BUILD_DIR)/Programs/_freeze_importlib $(HOST_BUILD_PREFIX)/bin/_freeze_importlib + $(INSTALL_DIR) $(HOST_PYTHON3_DIR)/bin/ + $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_PYTHON3_DIR)/bin/pgen3 + $(INSTALL_BIN) $(HOST_BUILD_DIR)/Programs/_freeze_importlib $(HOST_PYTHON3_DIR)/bin/_freeze_importlib endef $(eval $(call HostBuild)) diff --git a/lang/python3/files/python3-package.mk b/lang/python3/files/python3-package.mk index 1a12d13dd..60feaf195 100644 --- a/lang/python3/files/python3-package.mk +++ b/lang/python3/files/python3-package.mk @@ -26,8 +26,9 @@ PYTHON3_PKG_DIR:=/usr/lib/python$(PYTHON3_VERSION)/site-packages PYTHON3:=python$(PYTHON3_VERSION) -HOST_PYTHON3_LIB_DIR:=$(STAGING_DIR_HOSTPKG)/lib/python$(PYTHON3_VERSION) -HOST_PYTHON3_BIN:=$(STAGING_DIR_HOSTPKG)/bin/python3 +HOST_PYTHON3_DIR:=$(STAGING_DIR_HOSTPKG) +HOST_PYTHON3_LIB_DIR:=$(HOST_PYTHON3_DIR)/lib/python$(PYTHON3_VERSION) +HOST_PYTHON3_BIN:=$(HOST_PYTHON3_DIR)/bin/python3 PYTHON3PATH:=$(PYTHON3_LIB_DIR):$(STAGING_DIR)/$(PYTHON3_PKG_DIR):$(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR) define HostPython3