From 26988f905f1f78ee0fd67dc90c3c7b112ac1817d Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Mon, 6 Sep 2021 10:43:47 +0300 Subject: [PATCH] python3: bump version to 3.9.7 Refreshed patches. And apply hack for line-endings in pep517 (from pip). Hack comment: # FIXME: [1] get rid of this asap; 'patch' doesn't like Windows endings, and this file is full of them... # I actually tried this in a number of ways and the only way to fix this is to implement # a poor-man's dos2unix using sed. # The issue is with the pip package; it seems that it throws in some Windows line-endings # and 'patch' won't handle them. So, we do a "dos2unix" and then patch. # We can get rid of this once this is solved upstream and in pip: # https://github.com/pypa/pep517/pull/130 Signed-off-by: Alexandru Ardelean --- lang/python/python3-version.mk | 8 ++++---- lang/python/python3/Makefile | 15 +++++++++++++-- ...add-multiarch-paths-when-cross-compiling.patch | 2 +- ...not-add-rt-lib-dirs-when-cross-compiling.patch | 2 +- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/lang/python/python3-version.mk b/lang/python/python3-version.mk index fe788c7cc..b0772218b 100644 --- a/lang/python/python3-version.mk +++ b/lang/python/python3-version.mk @@ -8,12 +8,12 @@ # Note: keep in sync with setuptools & pip PYTHON3_VERSION_MAJOR:=3 PYTHON3_VERSION_MINOR:=9 -PYTHON3_VERSION_MICRO:=6 +PYTHON3_VERSION_MICRO:=7 PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) -PYTHON3_SETUPTOOLS_PKG_RELEASE:=2 +PYTHON3_SETUPTOOLS_PKG_RELEASE:=1 PYTHON3_PIP_PKG_RELEASE:=1 -PYTHON3_SETUPTOOLS_VERSION:=56.0.0 -PYTHON3_PIP_VERSION:=21.1.3 +PYTHON3_SETUPTOOLS_VERSION:=57.4.0 +PYTHON3_PIP_VERSION:=21.2.3 diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index 794d003b1..8eb28aea0 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -11,12 +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) -PKG_HASH:=397920af33efc5b97f2e0b57e91923512ef89fc5b3c1d21dbfc8c4828ce0108a +# FIXME: if updating, get rid of [1] & [2] asap +PKG_HASH:=f8145616e68c00041d1a6399b76387390388f8359581abc24432bb969b5e3c57 PKG_MAINTAINER:=Alexandru Ardelean , Jeffery To PKG_LICENSE:=Python/2.0 @@ -206,6 +207,14 @@ define Build/Compile/python3-pip --root=$(PKG_BUILD_DIR)/install-pip \ --prefix=/usr \ $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/pip-$(PYTHON3_PIP_VERSION)-py3-none-any.whl + # FIXME: [1] get rid of this asap; 'patch' doesn't like Windows endings, and this file is full of them... + # I actually tried this in a number of ways and the only way to fix this is to implement + # a poor-man's dos2unix using sed. + # The issue is with the pip package; it seems that it throws in some Windows line-endings + # and 'patch' won't handle them. So, we do a "dos2unix" and then patch. + # We can get rid of this once this is solved upstream and in pip: + # https://github.com/pypa/pep517/pull/130 + sed 's/\r//' -i $(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON3_VERSION)/site-packages/pip/_vendor/pep517/in_process/__init__.py $(call PatchDir,$(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON3_VERSION)/site-packages,./patches-pip,) endef else @@ -364,6 +373,8 @@ define Host/Install touch $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE) ) $(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.pip_installed_$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE)),, + # FIXME: [2] get rid of this asap; same as [1] + sed 's/\r//' -i $(HOST_PYTHON3_PKG_DIR)/pip/_vendor/pep517/in_process/__init__.py $(call HostPatchDir,$(HOST_PYTHON3_PKG_DIR),./patches-pip,) touch $(HOST_PYTHON3_PKG_DIR)/.pip_installed_$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE) ) diff --git a/lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch b/lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch index 2565207cc..733340fd0 100644 --- a/lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch +++ b/lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch @@ -1,6 +1,6 @@ --- a/setup.py +++ b/setup.py -@@ -734,7 +734,8 @@ class PyBuildExt(build_ext): +@@ -737,7 +737,8 @@ class PyBuildExt(build_ext): # only change this for cross builds for 3.3, issues on Mageia if CROSS_COMPILING: self.add_cross_compiling_paths() diff --git a/lang/python/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch b/lang/python/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch index 9c3777e1a..ee0c8124e 100644 --- a/lang/python/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch +++ b/lang/python/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch @@ -1,6 +1,6 @@ --- a/setup.py +++ b/setup.py -@@ -711,8 +711,9 @@ class PyBuildExt(build_ext): +@@ -714,8 +714,9 @@ class PyBuildExt(build_ext): # directly since an inconsistently reproducible issue comes up where # the environment variable is not set even though the value were passed # into configure and stored in the Makefile (issue found on OS X 10.3).