mirror of
https://github.com/openwrt/packages.git
synced 2025-12-23 10:14:32 +04:00
python3: bump to version 3.10.0
Manually re-applied: 008-distutils-use-python-sysroot.patch 016-adjust-config-paths.patch Drop patch: 003-do-not-run-distutils-tests.patch There is now a configure option '--disable-test-modules' And seems we left the '_ctypes_test' around for quite some time. Dropped now. Refs: https://bugs.python.org/issue27640 https://bugs.python.org/issue43282 Drop patch: 013-getbuildinfo-date-time-source-date-epoch.patch Python build honors SOURCE_DATE_EPOCH pretty well now. Drop setuptools patches. Setuptools should be reproducible with Python 3.6+ according to a mention here: https://github.com/pypa/setuptools/pull/1690#issuecomment-536517456 It's time to let upstream fix Setuptools reproduce-ability. Drop patch: 010-do-not-add-rt-lib-dirs-when-cross-compiling.patch I can't seem to fully remember why it's there. And it seem to build fine without it. Drop patch: 015-abort-on-failed-modules.patch Python build supports a similar PYTHONSTRICTEXTENSIONBUILD=1 env-var option. Add patch: 026-openssl-feature-flags.patch We need to keep this in our tree for a while. See: https://bugs.python.org/issue45627 Backport patch: 027-bpo-43158-Use-configure-values-for-building-_uuid-ex.patch Link: https://github.com/python/cpython/pull/29353 Fixes the build for uuid C module. Add patch: 028-host-python-support-ssl-with-libressl.patch We need the _ssl module working on the host-side with LibreSSL for pip to work to download from https://pypi.org Refs: https://github.com/openwrt/openwrt/pull/4749 Add patch: 029-disable-deprecation-warning.patch Fixes apparmor build. The warning causes a configure error. Refreshed the rest of patches. Some old build-flags were removed. They don't seem to be necessary anymore. Split python3-uuid from python3-light. To better manage the libuuid library (if needed). Also, fixing the uuid C module build. Seems this was failing, and was falling back to using hashlib. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
@@ -11,13 +11,13 @@ include $(TOPDIR)/rules.mk
|
||||
include ../python3-version.mk
|
||||
|
||||
PKG_NAME:=python3
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO)
|
||||
|
||||
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
|
||||
# FIXME: if updating, get rid of [1] & [2] asap
|
||||
PKG_HASH:=f8145616e68c00041d1a6399b76387390388f8359581abc24432bb969b5e3c57
|
||||
PKG_HASH:=5a99f8e7a6a11a7b98b4e75e0d1303d3832cada5534068f69c7b6222a7b1b002
|
||||
|
||||
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com>
|
||||
PKG_LICENSE:=Python/2.0
|
||||
@@ -91,7 +91,7 @@ endef
|
||||
define Package/python3-light
|
||||
$(call Package/python3/Default)
|
||||
TITLE:=Python $(PYTHON3_VERSION) light installation
|
||||
DEPENDS:=+python3-base +libffi +libbz2 +libuuid
|
||||
DEPENDS:=+python3-base +libffi +libbz2
|
||||
endef
|
||||
|
||||
define Package/python3-light/config
|
||||
@@ -136,18 +136,13 @@ define Package/python3/description
|
||||
It's python3-light + all other packages.
|
||||
endef
|
||||
|
||||
TARGET_CONFIGURE_OPTS+= \
|
||||
READELF="$(TARGET_CROSS)readelf"
|
||||
|
||||
MAKE_FLAGS+=\
|
||||
LD="$(TARGET_CC)"
|
||||
|
||||
EXTRA_CFLAGS+= \
|
||||
-DNDEBUG -fno-inline
|
||||
EXTRA_LDFLAGS+= \
|
||||
-L$(PKG_BUILD_DIR) \
|
||||
-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
|
||||
|
||||
MAKE_VARS += \
|
||||
PYTHONSTRICTEXTENSIONBUILD=1
|
||||
|
||||
CONFIGURE_ARGS+= \
|
||||
--enable-optimizations \
|
||||
--enable-shared \
|
||||
@@ -155,6 +150,7 @@ CONFIGURE_ARGS+= \
|
||||
--without-cxx-main \
|
||||
--without-ensurepip \
|
||||
--without-pymalloc \
|
||||
--disable-test-modules \
|
||||
$(if $(CONFIG_IPV6),--enable-ipv6) \
|
||||
$(if $(findstring mips,$(CONFIG_ARCH)),,--with-lto) \
|
||||
CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \
|
||||
@@ -320,6 +316,10 @@ HOST_LDFLAGS += \
|
||||
-Wl,--no-as-needed -lrt
|
||||
endif
|
||||
|
||||
# Would be nice to be able to do this, but hosts are very fiddly
|
||||
# HOST_MAKE_VARS += \
|
||||
# PYTHONSTRICTEXTENSIONBUILD=1
|
||||
|
||||
ifeq ($(HOST_OS),Darwin)
|
||||
HOST_CONFIGURE_VARS += \
|
||||
ac_cv_header_libintl_h=no
|
||||
@@ -327,12 +327,18 @@ HOST_MAKE_VARS += \
|
||||
USE_PYTHON_CONFIG_PY=1
|
||||
endif
|
||||
|
||||
# FIXME: remove when removing patch '028-host-python-support-ssl-with-libressl.patch'
|
||||
HOST_CFLAGS += \
|
||||
-DOPENWRT_HOST_BUILD
|
||||
|
||||
HOST_CONFIGURE_ARGS+= \
|
||||
--enable-optimizations \
|
||||
--with-ensurepip=upgrade \
|
||||
--with-system-expat=$(STAGING_DIR_HOSTPKG) \
|
||||
--with-ssl-default-suites=openssl \
|
||||
--without-cxx-main \
|
||||
--without-pymalloc \
|
||||
--disable-test-modules \
|
||||
CONFIG_SITE=
|
||||
|
||||
define Host/Configure
|
||||
|
||||
Reference in New Issue
Block a user