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>
# Note: keep in sync with setuptools & pip
PYTHON3_VERSION_MAJOR:=3
PYTHON3_VERSION_MINOR:=9
-PYTHON3_VERSION_MICRO:=4
+PYTHON3_VERSION_MICRO:=5
PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
PYTHON3_SETUPTOOLS_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
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)
-PKG_HASH:=4b0e6644a76f8df864ae24ac500a51bbf68bd098f6a173e27d3b61cdca9aa134
+PKG_HASH:=0c5a140665436ec3dbfbb79e2dfb6d192655f26ef4a29aeffcb6d1820d716d83
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com>
PKG_LICENSE:=Python/2.0
--ignore-installed \
--root=$(PKG_BUILD_DIR)/install-pip \
--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,)
endef
endif # CONFIG_PACKAGE_python3-pip
define Host/Install
$(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)),,
rm -rf \
- $(HOST_PYTHON3_PKG_DIR)/easy_install.py \
$(HOST_PYTHON3_PKG_DIR)/pkg_resources \
$(HOST_PYTHON3_PKG_DIR)/setuptools \
$(HOST_PYTHON3_PKG_DIR)/setuptools-* \
define Py3Package/python3-setuptools/install
$(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) \
$(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/easy_install.py \
$(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/ -type d -name __pycache__ -delete
-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
def _in_proc_script_path():
+ if not os.path.isfile(_in_proc_script):
+ _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.pyc')
+ yield _in_proc_script
-
-
- @contextmanager
--- a/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 \
$(DESTDIR)$(LIBDEST); \
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
$(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
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
--- a/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
Modules/getbuildinfo.o: $(PARSER_OBJS) \
$(OBJECT_OBJS) \
$(PYTHON_OBJS) \
-@@ -772,6 +782,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
+@@ -782,6 +792,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
$(DTRACE_OBJS) \
$(srcdir)/Modules/getbuildinfo.c
$(CC) -c $(PY_CORE_CFLAGS) \
--- a/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 "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
$as_echo_n "checking SOABI... " >&6; }
--- a/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_RESULT($ABIFLAGS)
AC_MSG_CHECKING(SOABI)
abi=sys.abiflags,
--- a/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; \
done; \
done
$(DESTDIR)$(LIBDEST); \
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
ifeq (@COMPILE_ALL_TESTS@,yes)
-@@ -1693,7 +1693,7 @@ sharedinstall: sharedmods
+@@ -1713,7 +1713,7 @@ sharedinstall: sharedmods
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
--root=$(DESTDIR)/
# Here are a couple of targets for MacOSX again, to install a full
--- a/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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
$as_echo "$interp" >&6; }
fi
elif test "$cross_compiling" = maybe; then
as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
-@@ -15436,7 +15436,7 @@ fi
+@@ -15441,7 +15441,7 @@ fi
fi
elif test "$cross_compiling" = maybe; then
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.
AC_SUBST(PY_ENABLE_SHARED)
--- a/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
@ # version doesn't use the compiler customizations that are provided
@ # in python (_osx_support.py).