Browse Source

Merge pull request #3297 from NeoRaider/python

python, python3, python-*: use default prefix for host install
lilik-openwrt-22.03
Hannu Nyman 8 years ago
committed by GitHub
parent
commit
265f9595ed
8 changed files with 34 additions and 33 deletions
  1. +1
    -1
      lang/python-cffi/Makefile
  2. +1
    -1
      lang/python-ply/Makefile
  3. +1
    -1
      lang/python-pycparser/Makefile
  4. +1
    -1
      lang/python-setuptools/Makefile
  5. +13
    -13
      lang/python/Makefile
  6. +3
    -3
      lang/python/files/python-host.mk
  7. +12
    -11
      lang/python3/Makefile
  8. +2
    -2
      lang/python3/files/python3-package.mk

+ 1
- 1
lang/python-cffi/Makefile View File

@ -45,7 +45,7 @@ define Build/Compile
endef
define Host/Compile
$(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR)/host")
$(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)")
endef
define Host/Install


+ 1
- 1
lang/python-ply/Makefile View File

@ -46,7 +46,7 @@ define Build/Compile
endef
define Host/Compile
$(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR)/host")
$(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)")
endef
define Host/Install


+ 1
- 1
lang/python-pycparser/Makefile View File

@ -47,7 +47,7 @@ define Build/Compile
endef
define Host/Compile
$(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR)/host")
$(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)")
endef
define Host/Install


+ 1
- 1
lang/python-setuptools/Makefile View File

@ -63,7 +63,7 @@ endef
define Host/Compile
$(call Build/Compile/HostPyMod,,\
install --root="$(STAGING_DIR)/host" --prefix="" \
install --root="$(HOST_BUILD_PREFIX)" --prefix="" \
--single-version-externally-managed \
)
endef


+ 13
- 13
lang/python/Makefile View File

@ -144,13 +144,13 @@ 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) \
$(STAGING_DIR)/host/lib/pkgconfig/python.pc \
$(STAGING_DIR)/host/lib/pkgconfig/python2.pc \
$(STAGING_DIR)/host/lib/pkgconfig/python-$(PYTHON_VERSION).pc \
$(HOST_BUILD_PREFIX)/lib/pkgconfig/python.pc \
$(HOST_BUILD_PREFIX)/lib/pkgconfig/python2.pc \
$(HOST_BUILD_PREFIX)/lib/pkgconfig/python-$(PYTHON_VERSION).pc \
$(1)/usr/lib/pkgconfig
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
@ -221,20 +221,20 @@ 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) \
CONFIG_SITE= \
CFLAGS="$(HOST_CFLAGS)"
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/pgen2
$(INSTALL_DIR) $(HOST_BUILD_PREFIX)/bin/
$(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_BUILD_PREFIX)/bin/pgen2
endef
$(eval $(call HostBuild))


+ 3
- 3
lang/python/files/python-host.mk View File

@ -5,7 +5,7 @@
# See /LICENSE for more information.
#
HOST_PYTHON_DIR:=$(STAGING_DIR)/host
HOST_PYTHON_DIR:=$(HOST_BUILD_PREFIX)
HOST_PYTHON_INC_DIR:=$(HOST_PYTHON_DIR)/include/python$(PYTHON_VERSION)
HOST_PYTHON_LIB_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION)
@ -13,7 +13,7 @@ HOST_PYTHON_PKG_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)/host/$(HOST_PYTHON_PKG_DIR)
HOST_PYTHONPATH:=$(HOST_PYTHON_LIB_DIR):$(HOST_BUILD_PREFIX)/$(HOST_PYTHON_PKG_DIR)
define HostPython
if [ "$(strip $(3))" == "HOST" ]; then \
@ -44,7 +44,7 @@ define Build/Compile/HostPyRunHost
LDSHARED="$(HOSTCC) -shared" \
CFLAGS="$(HOST_CFLAGS)" \
CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON_INC_DIR)" \
LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR)/host/lib" \
LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION) -Wl$(comma)-rpath=$(HOST_BUILD_PREFIX)/lib" \
_PYTHON_HOST_PLATFORM=linux2 \
$(3) \
, \


+ 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