From 766a2fa6d337f5eb7159c24d0f72a9822c76394619131a5f82b6f9a04c4c326f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Wed, 21 Jan 2026 19:11:22 +0100 Subject: [PATCH] Remodel python-3.3.0b1-fix_date_time_compiler.patch It should be upstreamable (make it dependent on the environment variable $UNVERSIONED_COMPILER; gh#python/cpython#144121). --- bpo-31046_ensurepip_honours_prefix.patch | 20 +++++++-------- python-3.3.0b1-fix_date_time_compiler.patch | 28 ++++++++++++++++----- python315.changes | 7 ++++++ python315.spec | 4 ++- 4 files changed, 42 insertions(+), 17 deletions(-) diff --git a/bpo-31046_ensurepip_honours_prefix.patch b/bpo-31046_ensurepip_honours_prefix.patch index f481098..42ce303 100644 --- a/bpo-31046_ensurepip_honours_prefix.patch +++ b/bpo-31046_ensurepip_honours_prefix.patch @@ -16,7 +16,7 @@ Co-Authored-By: Xavier de Gaye Index: Python-3.15.0a3/Doc/library/ensurepip.rst =================================================================== --- Python-3.15.0a3.orig/Doc/library/ensurepip.rst 2025-12-16 13:26:12.000000000 +0100 -+++ Python-3.15.0a3/Doc/library/ensurepip.rst 2025-12-19 02:25:25.531895542 +0100 ++++ Python-3.15.0a3/Doc/library/ensurepip.rst 2026-01-21 18:16:58.317178174 +0100 @@ -65,7 +65,11 @@ By default, ``pip`` is installed into the current virtual environment (if one is active) or into the system site packages (if there is no @@ -59,8 +59,8 @@ Index: Python-3.15.0a3/Doc/library/ensurepip.rst .. note:: Index: Python-3.15.0a3/Lib/ensurepip/__init__.py =================================================================== ---- Python-3.15.0a3.orig/Lib/ensurepip/__init__.py 2025-12-19 02:25:10.205902876 +0100 -+++ Python-3.15.0a3/Lib/ensurepip/__init__.py 2025-12-19 02:25:25.532348886 +0100 +--- Python-3.15.0a3.orig/Lib/ensurepip/__init__.py 2026-01-21 18:16:36.646076159 +0100 ++++ Python-3.15.0a3/Lib/ensurepip/__init__.py 2026-01-21 18:16:58.317562933 +0100 @@ -106,27 +106,27 @@ os.environ['PIP_CONFIG_FILE'] = os.devnull @@ -125,8 +125,8 @@ Index: Python-3.15.0a3/Lib/ensurepip/__init__.py verbosity=args.verbosity, Index: Python-3.15.0a3/Lib/test/test_ensurepip.py =================================================================== ---- Python-3.15.0a3.orig/Lib/test/test_ensurepip.py 2025-12-19 02:25:11.631602338 +0100 -+++ Python-3.15.0a3/Lib/test/test_ensurepip.py 2025-12-19 02:25:25.532817735 +0100 +--- Python-3.15.0a3.orig/Lib/test/test_ensurepip.py 2026-01-21 18:16:38.055385060 +0100 ++++ Python-3.15.0a3/Lib/test/test_ensurepip.py 2026-01-21 18:16:58.317858155 +0100 @@ -105,6 +105,17 @@ unittest.mock.ANY, ) @@ -147,9 +147,9 @@ Index: Python-3.15.0a3/Lib/test/test_ensurepip.py Index: Python-3.15.0a3/Makefile.pre.in =================================================================== ---- Python-3.15.0a3.orig/Makefile.pre.in 2025-12-19 02:25:24.201299566 +0100 -+++ Python-3.15.0a3/Makefile.pre.in 2025-12-19 02:25:25.533184405 +0100 -@@ -2389,7 +2389,7 @@ +--- Python-3.15.0a3.orig/Makefile.pre.in 2026-01-21 18:16:49.104742043 +0100 ++++ Python-3.15.0a3/Makefile.pre.in 2026-01-21 18:16:58.318353823 +0100 +@@ -2391,7 +2391,7 @@ install|*) ensurepip="" ;; \ esac; \ $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \ @@ -158,7 +158,7 @@ Index: Python-3.15.0a3/Makefile.pre.in fi .PHONY: altinstall -@@ -2400,7 +2400,7 @@ +@@ -2402,7 +2402,7 @@ install|*) ensurepip="--altinstall" ;; \ esac; \ $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \ @@ -170,6 +170,6 @@ Index: Python-3.15.0a3/Makefile.pre.in Index: Python-3.15.0a3/Misc/NEWS.d/next/Build/2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ Python-3.15.0a3/Misc/NEWS.d/next/Build/2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst 2025-12-19 02:25:25.534506792 +0100 ++++ Python-3.15.0a3/Misc/NEWS.d/next/Build/2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst 2026-01-21 18:16:58.318910394 +0100 @@ -0,0 +1 @@ +A directory prefix can now be specified when using :mod:`ensurepip`. diff --git a/python-3.3.0b1-fix_date_time_compiler.patch b/python-3.3.0b1-fix_date_time_compiler.patch index c751deb..79c8c48 100644 --- a/python-3.3.0b1-fix_date_time_compiler.patch +++ b/python-3.3.0b1-fix_date_time_compiler.patch @@ -1,19 +1,35 @@ +From 8323be9cee608439cd1a7c1e026d744bbbc83805 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= +Date: Wed, 21 Jan 2026 17:10:46 +0100 +Subject: [PATCH] Allow overriding COMPILER with UNVERSIONED_COMPILER + +Introduce UNVERSIONED_COMPILER variable in Makefile.pre.in to allow +overriding the COMPILER macro definition during the build of +Python/getcompiler.o. + +This enables reproducible builds by providing a way to set a generic +compiler identification string (e.g., "[GCC]") instead of the default +versioned one. + +The rule is made conditional on UNVERSIONED_COMPILER being defined. --- - Makefile.pre.in | 5 +++++ - 1 file changed, 5 insertions(+) + Makefile.pre.in | 7 +++++++ + 1 file changed, 7 insertions(+) Index: Python-3.15.0a3/Makefile.pre.in =================================================================== ---- Python-3.15.0a3.orig/Makefile.pre.in 2025-12-19 02:26:23.594002103 +0100 -+++ Python-3.15.0a3/Makefile.pre.in 2025-12-19 02:26:28.185444105 +0100 -@@ -1926,6 +1926,11 @@ +--- Python-3.15.0a3.orig/Makefile.pre.in 2025-12-16 13:26:12.000000000 +0100 ++++ Python-3.15.0a3/Makefile.pre.in 2026-01-21 18:16:49.104742043 +0100 +@@ -1926,6 +1926,13 @@ -DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \ -o $@ $(srcdir)/Modules/getbuildinfo.c ++ifdef UNVERSIONED_COMPILER +Python/getcompiler.o: $(srcdir)/Python/getcompiler.c Makefile + $(CC) -c $(PY_CORE_CFLAGS) \ -+ -DCOMPILER='"[GCC]"' \ ++ -DCOMPILER='"$(UNVERSIONED_COMPILER)"' \ + -o $@ $(srcdir)/Python/getcompiler.c ++endif + Modules/getpath.o: $(srcdir)/Modules/getpath.c Python/frozen_modules/getpath.h Makefile $(PYTHON_HEADERS) $(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \ diff --git a/python315.changes b/python315.changes index 52b90c2..f4659e9 100644 --- a/python315.changes +++ b/python315.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jan 21 18:02:37 UTC 2026 - Matej Cepl + +- Remodel python-3.3.0b1-fix_date_time_compiler.patch to be + upstreamable (make it dependent on the environment variable + $UNVERSIONED_COMPILER; gh#python/cpython#144121). + ------------------------------------------------------------------- Fri Jan 9 10:41:47 UTC 2026 - Matej Cepl diff --git a/python315.spec b/python315.spec index 4513ef5..16e9d0d 100644 --- a/python315.spec +++ b/python315.spec @@ -201,7 +201,8 @@ Source100: PACKAGING-NOTES Patch02: F00251-change-user-install-location.patch # support finding packages in /usr/local, install to /usr/local by default Patch03: python-3.3.0b1-localpath.patch -# replace DATE, TIME and COMPILER by fixed definitions to aid reproducible builds +# PATCH-FIX-UPSTREAM python-3.3.0b1-fix_date_time_compiler.patch gh#python/cpython#144121 mcepl@suse.com +# replace COMPILER by fixed definitions to aid reproducible builds Patch04: python-3.3.0b1-fix_date_time_compiler.patch # Raise timeout value for test_subprocess Patch06: subprocess-raise-timeout.patch @@ -575,6 +576,7 @@ sed -i -e '/^SPHINXERRORHANDLING/s/--fail-on-warning//' Doc/Makefile %build export SUSE_VERSION="0%{?suse_version}" export SLE_VERSION="0%{?sle_version}" +export UNVERSIONED_COMPILER="[GCC]" %if %{with doc} TODAY_DATE=`date -r %{SOURCE0} "+%B %d, %Y"`