Browse Source

python3: use default prefix for host install

Also fixes a few incorrect "$(STAGING_DIR_HOST)/host" paths.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
lilik-openwrt-22.03
Matthias Schiffer 8 years ago
parent
commit
b53342b9a4
No known key found for this signature in database GPG Key ID: 16EF3F64CB201D9C
2 changed files with 14 additions and 13 deletions
  1. +12
    -11
      lang/python3/Makefile
  2. +2
    -2
      lang/python3/files/python3-package.mk

+ 12
- 11
lang/python3/Makefile View File

@ -146,7 +146,7 @@ define Build/InstallDev
$(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
$(1)/usr/include/
$(CP) \
$(STAGING_DIR)/host/lib/python$(PYTHON_VERSION) \
$(HOST_BUILD_PREFIX)/lib/python$(PYTHON_VERSION) \
$(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
$(1)/usr/lib/
$(CP) \
@ -216,13 +216,13 @@ HOST_CONFIGURE_ARGS+= \
--without-cxx-main \
--without-pymalloc \
--with-threads \
--prefix=$(STAGING_DIR)/host \
--exec-prefix=$(STAGING_DIR)/host \
--sysconfdir=$(STAGING_DIR_HOST)/host/etc \
--localstatedir=$(STAGING_DIR)/host/var \
--sbindir=$(STAGING_DIR)/host/bin \
--with-system-expat=$(STAGING_DIR)/host \
--with-system-ffi=$(STAGING_DIR)/host \
--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) \
--with-ensurepip=upgrade \
CONFIG_SITE= \
CFLAGS="$(HOST_CFLAGS)"
@ -233,10 +233,11 @@ define Host/Compile
endef
define Host/Install
$(INSTALL_DIR) $(STAGING_DIR)/host/bin/
$(MAKE) -C $(HOST_BUILD_DIR) install
$(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR)/host/bin/pgen3
$(INSTALL_BIN) $(HOST_BUILD_DIR)/Programs/_freeze_importlib $(STAGING_DIR)/host/bin/_freeze_importlib
$(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
endef
$(eval $(call HostBuild))


+ 2
- 2
lang/python3/files/python3-package.mk View File

@ -20,8 +20,8 @@ PYTHON3_PKG_DIR:=/usr/lib/python$(PYTHON3_VERSION)/site-packages
PYTHON3:=python$(PYTHON3_VERSION)
HOST_PYTHON3_LIB_DIR:=$(STAGING_DIR)/host/lib/python$(PYTHON3_VERSION)
HOST_PYTHON3_BIN:=$(STAGING_DIR)/host/bin/python3
HOST_PYTHON3_LIB_DIR:=$(HOST_BUILD_PREFIX)/lib/python$(PYTHON3_VERSION)
HOST_PYTHON3_BIN:=$(HOST_BUILD_PREFIX)/bin/python3
PYTHON3PATH:=$(PYTHON3_LIB_DIR):$(STAGING_DIR)/$(PYTHON3_PKG_DIR):$(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)
define HostPython3


Loading…
Cancel
Save