Browse Source

Merge pull request #771 from commodo/python-updates

Python updates
lilik-openwrt-22.03
Steven Barth 10 years ago
parent
commit
cc3210afd3
3 changed files with 40 additions and 3 deletions
  1. +8
    -2
      lang/python/Makefile
  2. +1
    -1
      lang/python/files/python-package.mk
  3. +31
    -0
      lang/python/patches/150-fix-libffi-x86-64-configure.patch

+ 8
- 2
lang/python/Makefile View File

@ -28,7 +28,7 @@ HOST_BUILD_PARALLEL:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=libffi/host python/host
PKG_BUILD_DEPENDS:=python/host
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
@ -104,7 +104,7 @@ endef
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR)/mk/
$(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/ $(1)/usr/lib/pkgconfig
$(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
$(INSTALL_DATA) ./files/python-package.mk $(STAGING_DIR)/mk/
$(CP) \
@ -114,6 +114,11 @@ define Build/InstallDev
$(STAGING_DIR_HOST)/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 \
$(1)/usr/lib/pkgconfig
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
$(1)/usr/lib/python$(PYTHON_VERSION)/
@ -191,6 +196,7 @@ HOST_CONFIGURE_ARGS+= \
--without-pymalloc \
--with-threads \
--prefix=$(STAGING_DIR_HOST) \
--with-ensurepip=upgrade \
CONFIG_SITE= \
OPT="$(HOST_CFLAGS)"


+ 1
- 1
lang/python/files/python-package.mk View File

@ -98,7 +98,7 @@ define Build/Compile/PyMod
CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON_INC_DIR)" \
LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON_VERSION)" \
_PYTHON_HOST_PLATFORM="linux-$(ARCH)" \
_PYTHON_HOST_PLATFORM=linux2 \
__PYVENV_LAUNCHER__="/usr/bin/$(PYTHON)" \
$(3) \
, \


+ 31
- 0
lang/python/patches/150-fix-libffi-x86-64-configure.patch View File

@ -0,0 +1,31 @@
diff --git a/Modules/_ctypes/libffi/configure b/Modules/_ctypes/libffi/configure
index 75f62a7..4d6c9f2 100755
--- a/Modules/_ctypes/libffi/configure
+++ b/Modules/_ctypes/libffi/configure
@@ -17257,20 +17257,12 @@ case "$host" in
fi
;;
- i?86-*-* | x86_64-*-*)
- TARGETDIR=x86
- if test $ac_cv_sizeof_size_t = 4; then
- case "$host" in
- *-gnux32)
- TARGET=X86_64
- ;;
- *)
- TARGET=X86
- ;;
- esac
- else
- TARGET=X86_64;
- fi
+ i?86-*-*)
+ TARGET=X86; TARGETDIR=x86
+ ;;
+
+ x86_64-*-*)
+ TARGET=X86_64; TARGETDIR=x86
;;
ia64*-*-*)

Loading…
Cancel
Save