Browse Source

python3: bump version to 3.9.5

Refreshed Python patches.
Updated pip & setuptools version.

For pip, patch '001-pep517-pyc-fix.patch' was reworked.

Also, the current version of the bundled pip (21.1.1) no longer supports
Python2, so the 'py2.py3' suffix gets replaced with just py3.

For setuptools, there is no longer a script/module:
  https://github.com/pypa/setuptools/pull/2544

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
lilik-openwrt-22.03
Alexandru Ardelean 4 years ago
parent
commit
e312275dd9
9 changed files with 23 additions and 30 deletions
  1. +3
    -3
      lang/python/python3-version.mk
  2. +3
    -4
      lang/python/python3/Makefile
  3. +0
    -4
      lang/python/python3/files/python3-package-setuptools.mk
  4. +5
    -7
      lang/python/python3/patches-pip/001-pep517-pyc-fix.patch
  5. +2
    -2
      lang/python/python3/patches/003-do-not-run-distutils-tests.patch
  6. +2
    -2
      lang/python/python3/patches/013-getbuildinfo-date-time-source-date-epoch.patch
  7. +2
    -2
      lang/python/python3/patches/014-remove-platform-so-suffix.patch
  8. +5
    -5
      lang/python/python3/patches/016-adjust-config-paths.patch
  9. +1
    -1
      lang/python/python3/patches/025-choose-python-config-version.patch

+ 3
- 3
lang/python/python3-version.mk View File

@ -8,12 +8,12 @@
# Note: keep in sync with setuptools & pip # Note: keep in sync with setuptools & pip
PYTHON3_VERSION_MAJOR:=3 PYTHON3_VERSION_MAJOR:=3
PYTHON3_VERSION_MINOR:=9 PYTHON3_VERSION_MINOR:=9
PYTHON3_VERSION_MICRO:=4
PYTHON3_VERSION_MICRO:=5
PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
PYTHON3_SETUPTOOLS_PKG_RELEASE:=1 PYTHON3_SETUPTOOLS_PKG_RELEASE:=1
PYTHON3_PIP_PKG_RELEASE:=1 PYTHON3_PIP_PKG_RELEASE:=1
PYTHON3_SETUPTOOLS_VERSION:=49.2.1
PYTHON3_PIP_VERSION:=20.2.3
PYTHON3_SETUPTOOLS_VERSION:=56.0.0
PYTHON3_PIP_VERSION:=21.1.1

+ 3
- 4
lang/python/python3/Makefile View File

@ -11,12 +11,12 @@ include $(TOPDIR)/rules.mk
include ../python3-version.mk include ../python3-version.mk
PKG_NAME:=python3 PKG_NAME:=python3
PKG_RELEASE:=2
PKG_RELEASE:=1
PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO) PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO)
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
PKG_HASH:=4b0e6644a76f8df864ae24ac500a51bbf68bd098f6a173e27d3b61cdca9aa134
PKG_HASH:=0c5a140665436ec3dbfbb79e2dfb6d192655f26ef4a29aeffcb6d1820d716d83
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com> PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com>
PKG_LICENSE:=Python/2.0 PKG_LICENSE:=Python/2.0
@ -201,7 +201,7 @@ define Build/Compile/python3-pip
--ignore-installed \ --ignore-installed \
--root=$(PKG_BUILD_DIR)/install-pip \ --root=$(PKG_BUILD_DIR)/install-pip \
--prefix=/usr \ --prefix=/usr \
$(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/pip-$(PYTHON3_PIP_VERSION)-py2.py3-none-any.whl
$(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/pip-$(PYTHON3_PIP_VERSION)-py3-none-any.whl
$(call PatchDir,$(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON3_VERSION)/site-packages,./patches-pip,) $(call PatchDir,$(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON3_VERSION)/site-packages,./patches-pip,)
endef endef
endif # CONFIG_PACKAGE_python3-pip endif # CONFIG_PACKAGE_python3-pip
@ -338,7 +338,6 @@ endef
define Host/Install define Host/Install
$(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)),, $(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)),,
rm -rf \ rm -rf \
$(HOST_PYTHON3_PKG_DIR)/easy_install.py \
$(HOST_PYTHON3_PKG_DIR)/pkg_resources \ $(HOST_PYTHON3_PKG_DIR)/pkg_resources \
$(HOST_PYTHON3_PKG_DIR)/setuptools \ $(HOST_PYTHON3_PKG_DIR)/setuptools \
$(HOST_PYTHON3_PKG_DIR)/setuptools-* \ $(HOST_PYTHON3_PKG_DIR)/setuptools-* \


+ 0
- 4
lang/python/python3/files/python3-package-setuptools.mk View File

@ -17,13 +17,9 @@ endef
define Py3Package/python3-setuptools/install define Py3Package/python3-setuptools/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
$(CP) $(PKG_BUILD_DIR)/install-setuptools/usr/bin/easy_install-* $(1)/usr/bin
$(LN) easy_install-$(PYTHON3_VERSION) $(1)/usr/bin/easy_install-3
$(LN) easy_install-$(PYTHON3_VERSION) $(1)/usr/bin/easy_install
$(CP) \ $(CP) \
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools \ $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools \
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools-$(PYTHON3_SETUPTOOLS_VERSION).dist-info \ $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools-$(PYTHON3_SETUPTOOLS_VERSION).dist-info \
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/easy_install.py \
$(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -path '*/__pycache__/*' -delete find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -path '*/__pycache__/*' -delete
find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -type d -name __pycache__ -delete find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -type d -name __pycache__ -delete


+ 5
- 7
lang/python/python3/patches-pip/001-pep517-pyc-fix.patch View File

@ -1,7 +1,8 @@
diff -Nurp a/pip/_vendor/pep517/wrappers.py b/pip/_vendor/pep517/wrappers.py
--- a/pip/_vendor/pep517/wrappers.py 2020-05-19 10:39:38.000000000 +0800
+++ b/pip/_vendor/pep517/wrappers.py 2020-06-30 20:19:05.495033208 +0800
@@ -14,11 +14,16 @@ try:
diff --git a/pip/_vendor/pep517/in_process/__init__.py b/pip/_vendor/pep517/in_process/__init__.py
index c932313..a01143b 100644
--- a/pip/_vendor/pep517/in_process/__init__.py
+++ b/pip/_vendor/pep517/in_process/__init__.py
@@ -10,8 +10,13 @@ try:
import importlib.resources as resources import importlib.resources as resources
def _in_proc_script_path(): def _in_proc_script_path():
@ -17,6 +18,3 @@ diff -Nurp a/pip/_vendor/pep517/wrappers.py b/pip/_vendor/pep517/wrappers.py
+ if not os.path.isfile(_in_proc_script): + if not os.path.isfile(_in_proc_script):
+ _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.pyc') + _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.pyc')
+ yield _in_proc_script + yield _in_proc_script
@contextmanager

+ 2
- 2
lang/python/python3/patches/003-do-not-run-distutils-tests.patch View File

@ -1,6 +1,6 @@
--- a/Makefile.pre.in --- a/Makefile.pre.in
+++ b/Makefile.pre.in +++ b/Makefile.pre.in
@@ -1526,6 +1526,7 @@ libinstall: build_all $(srcdir)/Modules/
@@ -1546,6 +1546,7 @@ libinstall: build_all $(srcdir)/Modules/
$(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \ $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \
$(DESTDIR)$(LIBDEST); \ $(DESTDIR)$(LIBDEST); \
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
@ -8,7 +8,7 @@
if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
$(DESTDIR)$(LIBDEST)/distutils/tests ; \ $(DESTDIR)$(LIBDEST)/distutils/tests ; \
@@ -1561,6 +1562,7 @@ libinstall: build_all $(srcdir)/Modules/
@@ -1581,6 +1582,7 @@ libinstall: build_all $(srcdir)/Modules/
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt


+ 2
- 2
lang/python/python3/patches/013-getbuildinfo-date-time-source-date-epoch.patch View File

@ -1,6 +1,6 @@
--- a/Makefile.pre.in --- a/Makefile.pre.in
+++ b/Makefile.pre.in +++ b/Makefile.pre.in
@@ -764,6 +764,16 @@ regen-all: regen-opcode regen-opcode-tar
@@ -774,6 +774,16 @@ regen-all: regen-opcode regen-opcode-tar
############################################################################ ############################################################################
# Special rules for object files # Special rules for object files
@ -17,7 +17,7 @@
Modules/getbuildinfo.o: $(PARSER_OBJS) \ Modules/getbuildinfo.o: $(PARSER_OBJS) \
$(OBJECT_OBJS) \ $(OBJECT_OBJS) \
$(PYTHON_OBJS) \ $(PYTHON_OBJS) \
@@ -772,6 +782,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
@@ -782,6 +792,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
$(DTRACE_OBJS) \ $(DTRACE_OBJS) \
$(srcdir)/Modules/getbuildinfo.c $(srcdir)/Modules/getbuildinfo.c
$(CC) -c $(PY_CORE_CFLAGS) \ $(CC) -c $(PY_CORE_CFLAGS) \


+ 2
- 2
lang/python/python3/patches/014-remove-platform-so-suffix.patch View File

@ -1,6 +1,6 @@
--- a/configure --- a/configure
+++ b/configure +++ b/configure
@@ -15366,7 +15366,7 @@ $as_echo_n "checking ABIFLAGS... " >&6;
@@ -15371,7 +15371,7 @@ $as_echo_n "checking ABIFLAGS... " >&6;
$as_echo "$ABIFLAGS" >&6; } $as_echo "$ABIFLAGS" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
$as_echo_n "checking SOABI... " >&6; } $as_echo_n "checking SOABI... " >&6; }
@ -11,7 +11,7 @@
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -4777,7 +4777,7 @@ AC_SUBST(SOABI)
@@ -4781,7 +4781,7 @@ AC_SUBST(SOABI)
AC_MSG_CHECKING(ABIFLAGS) AC_MSG_CHECKING(ABIFLAGS)
AC_MSG_RESULT($ABIFLAGS) AC_MSG_RESULT($ABIFLAGS)
AC_MSG_CHECKING(SOABI) AC_MSG_CHECKING(SOABI)


+ 5
- 5
lang/python/python3/patches/016-adjust-config-paths.patch View File

@ -20,7 +20,7 @@
abi=sys.abiflags, abi=sys.abiflags,
--- a/Makefile.pre.in --- a/Makefile.pre.in
+++ b/Makefile.pre.in +++ b/Makefile.pre.in
@@ -1535,7 +1535,7 @@ libinstall: build_all $(srcdir)/Modules/
@@ -1555,7 +1555,7 @@ libinstall: build_all $(srcdir)/Modules/
esac; \ esac; \
done; \ done; \
done done
@ -29,7 +29,7 @@
$(DESTDIR)$(LIBDEST); \ $(DESTDIR)$(LIBDEST); \
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
ifeq (@COMPILE_ALL_TESTS@,yes) ifeq (@COMPILE_ALL_TESTS@,yes)
@@ -1693,7 +1693,7 @@ sharedinstall: sharedmods
@@ -1713,7 +1713,7 @@ sharedinstall: sharedmods
--install-scripts=$(BINDIR) \ --install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \ --install-platlib=$(DESTSHARED) \
--root=$(DESTDIR)/ --root=$(DESTDIR)/
@ -40,7 +40,7 @@
# Here are a couple of targets for MacOSX again, to install a full # Here are a couple of targets for MacOSX again, to install a full
--- a/configure --- a/configure
+++ b/configure +++ b/configure
@@ -2977,7 +2977,7 @@ $as_echo_n "checking for python interpre
@@ -2979,7 +2979,7 @@ $as_echo_n "checking for python interpre
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
$as_echo "$interp" >&6; } $as_echo "$interp" >&6; }
@ -49,7 +49,7 @@
fi fi
elif test "$cross_compiling" = maybe; then elif test "$cross_compiling" = maybe; then
as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
@@ -15436,7 +15436,7 @@ fi
@@ -15441,7 +15441,7 @@ fi
@ -69,7 +69,7 @@
fi fi
elif test "$cross_compiling" = maybe; then elif test "$cross_compiling" = maybe; then
AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH]) AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
@@ -4835,7 +4835,7 @@ fi],
@@ -4839,7 +4839,7 @@ fi],
dnl define LIBPL after ABIFLAGS and LDVERSION is defined. dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
AC_SUBST(PY_ENABLE_SHARED) AC_SUBST(PY_ENABLE_SHARED)


+ 1
- 1
lang/python/python3/patches/025-choose-python-config-version.patch View File

@ -1,6 +1,6 @@
--- a/Makefile.pre.in --- a/Makefile.pre.in
+++ b/Makefile.pre.in +++ b/Makefile.pre.in
@@ -1587,7 +1587,7 @@ python-config: $(srcdir)/Misc/python-con
@@ -1607,7 +1607,7 @@ python-config: $(srcdir)/Misc/python-con
@ # On Darwin, always use the python version of the script, the shell @ # On Darwin, always use the python version of the script, the shell
@ # version doesn't use the compiler customizations that are provided @ # version doesn't use the compiler customizations that are provided
@ # in python (_osx_support.py). @ # in python (_osx_support.py).


Loading…
Cancel
Save