Compare commits

...

18 Commits

Author SHA1 Message Date
Python Maint 5b9ff3722c Rebuilt for Python 3.12 2023-06-13 17:23:48 +02:00
Python Maint 8b139823bd Bootstrap for Python 3.12 2023-06-13 15:03:26 +02:00
Tomáš Hrnčiar 036d63f211 Update to 3.12.0b2 2023-06-08 11:29:08 +02:00
Miro Hrončok 6073e4f006 --without rpmwheels: Declare bundled() provides and a complex License tag 2023-05-30 19:26:33 +02:00
Miro Hrončok 0c82a4ac9f Use wheels from RPMs, at least on Fedora 39+ 2023-05-29 16:00:31 +02:00
Tomáš Hrnčiar 8bed4bf373 Update to 3.12.0b1
This update enables budled pip, because in Fedora we don't have the
latest version yet.
See: https://src.fedoraproject.org/rpms/python-pip/pull-request/123#comment-142984
2023-05-25 14:53:49 +02:00
Miro Hrončok dd482b1c20 Remove ExcludeArch for arm, Fedora 36 went EOL 2023-05-22 11:10:13 +02:00
Tomáš Hrnčiar 3f1a71ddff Update to 3.12.0a7 2023-04-05 10:38:44 +02:00
Miro Hrončok 7e80f75262 Increase the test timeout in %check
We see test failures lately mostly on ppc64le
due to test_compile taking more than 30 minutes.
2023-03-24 00:36:36 +01:00
Tomáš Hrnčiar 1e78502d6d Update to 3.12.0a6 2023-03-08 09:56:50 +01:00
Miro Hrončok 204e750d2e CI: Disable Cython checks on the smoke test for now
Even Cython from git HEAD does not support 3.12.0a5 yet.
2023-02-11 22:30:50 +01:00
Tomáš Hrnčiar 440cc12f14 Update to 3.12.0a5 2023-02-08 18:38:25 +01:00
Miro Hrončok 4aa8fa2b5a Don't require pyproject-rpm-macros on RHEL
See also https://src.fedoraproject.org/rpms/pyproject-rpm-macros/pull-request/345
2023-01-20 20:55:43 +00:00
Fedora Release Engineering e190ec477f Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-20 18:45:19 +00:00
Tomáš Hrnčiar d0514d9a61 Update to 3.12.0a4 2023-01-11 10:52:12 +01:00
Miro Hrončok 1f1415ae57 No longer patch the default bytecode cache invalidation policy
That is, drop patch 328.

Fixes https://bugzilla.redhat.com/2133850

See also https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/154

This is part of https://fedoraproject.org/wiki/Changes/ReproducibleBuildsClampMtimes
2022-12-19 15:51:17 +01:00
Tomáš Hrnčiar 88efa1916c Update to 3.12.0a3 2022-12-07 16:11:18 +01:00
Miro Hrončok 6324efea7a %check: Run tests with %{_smp_mflags} instead of -j0
-j0 means: Run tests in parallel, automatic number of workers, according to CPU count
%{_smp_mflags} means: -j%{_smp_build_ncpus} where %{_smp_build_ncpus} is the CPU count by default

Hence, this makes no difference unless %{_smp_build_ncpus} is manually clamped.
In that case, we now respect the wishes of the builder/packager/etc.
2022-11-16 23:38:50 +00:00
8 changed files with 250 additions and 127 deletions

View File

@ -30,7 +30,7 @@ Co-authored-by: Lumír Balhar <frenzy.madness@gmail.com>
3 files changed, 71 insertions(+), 4 deletions(-)
diff --git a/Lib/site.py b/Lib/site.py
index 69670d9d7f..104cb93899 100644
index 672fa7b000..0a9c5be53e 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -377,8 +377,15 @@ def getsitepackages(prefixes=None):
@ -51,7 +51,7 @@ index 69670d9d7f..104cb93899 100644
if os.path.isdir(sitedir):
addsitedir(sitedir, known_paths)
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index 73c25684db..d43ce7f1a2 100644
index 122d441bd1..2d354a11da 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -104,6 +104,11 @@

View File

@ -1,54 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Thu, 11 Jul 2019 13:44:13 +0200
Subject: [PATCH] 00328: Restore pyc to TIMESTAMP invalidation mode as default
in rpmbuild
Since Fedora 31, the $SOURCE_DATE_EPOCH is set in rpmbuild to the latest
%changelog date. This makes Python default to the CHECKED_HASH pyc
invalidation mode, bringing more reproducible builds traded for an import
performance decrease. To avoid that, we don't default to CHECKED_HASH
when $RPM_BUILD_ROOT is set (i.e. when we are building RPM packages).
See https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/57#comment-27426
Downstream only: only used when building RPM packages
Ideally, we should talk to upstream and explain why we don't want this
---
Lib/py_compile.py | 3 ++-
Lib/test/test_py_compile.py | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/Lib/py_compile.py b/Lib/py_compile.py
index 388614e51b..db52725016 100644
--- a/Lib/py_compile.py
+++ b/Lib/py_compile.py
@@ -70,7 +70,8 @@ class PycInvalidationMode(enum.Enum):
def _get_default_invalidation_mode():
- if os.environ.get('SOURCE_DATE_EPOCH'):
+ if (os.environ.get('SOURCE_DATE_EPOCH') and not
+ os.environ.get('RPM_BUILD_ROOT')):
return PycInvalidationMode.CHECKED_HASH
else:
return PycInvalidationMode.TIMESTAMP
diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py
index 5e0a44ad96..ac14a6a54c 100644
--- a/Lib/test/test_py_compile.py
+++ b/Lib/test/test_py_compile.py
@@ -19,6 +19,7 @@ def without_source_date_epoch(fxn):
def wrapper(*args, **kwargs):
with os_helper.EnvironmentVarGuard() as env:
env.unset('SOURCE_DATE_EPOCH')
+ env.unset('RPM_BUILD_ROOT')
return fxn(*args, **kwargs)
return wrapper
@@ -29,6 +30,7 @@ def with_source_date_epoch(fxn):
def wrapper(*args, **kwargs):
with os_helper.EnvironmentVarGuard() as env:
env['SOURCE_DATE_EPOCH'] = '123456789'
+ env.unset('RPM_BUILD_ROOT')
return fxn(*args, **kwargs)
return wrapper

View File

@ -16,10 +16,10 @@ https://github.com/GrahamDumpleton/mod_wsgi/issues/730
2 files changed, 8 insertions(+), 50 deletions(-)
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index 13ba5068ae..8bf97c5542 100644
index 9e4972ecb6..6f081d8f38 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
@@ -1002,39 +1002,6 @@ def noop(): pass
@@ -987,39 +987,6 @@ def noop(): pass
threading.Thread(target=noop).start()
# Thread.join() is not called
@ -56,14 +56,14 @@ index 13ba5068ae..8bf97c5542 100644
- self.assertEqual(out, b'')
- self.assertEqual(err, b'')
-
class ThreadJoinOnShutdown(BaseTestCase):
def test_start_new_thread_at_exit(self):
code = """if 1:
import atexit
diff --git a/Lib/threading.py b/Lib/threading.py
index 723bd58bf5..0bdf0b7336 100644
index df273870fa..eba297776d 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -1563,29 +1563,20 @@ def _shutdown():
@@ -1565,29 +1565,20 @@ def _shutdown():
global _SHUTTING_DOWN
_SHUTTING_DOWN = True

View File

@ -0,0 +1,58 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Mon, 29 May 2023 15:51:16 +0200
Subject: [PATCH] 00401: Tests: Use setuptools+wheel from
sysconfig.get_config_var('WHEEL_PKG_DIR') if set
Proposed upstream https://github.com/python/cpython/pull/105056
---
Lib/test/support/__init__.py | 21 +++++++++++++++++++++
Lib/test/test_cppext.py | 4 ++--
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index d555c53fee..adc3f5901d 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -2398,5 +2398,26 @@ def adjust_int_max_str_digits(max_digits):
finally:
sys.set_int_max_str_digits(current)
+
+@functools.cache
+def _findwheel(pkgname):
+ """Try to find a wheel with the package specified as pkgname.
+
+ If set, the wheels are searched for in WHEEL_PKG_DIR (see ensurepip).
+ Otherwise, they are searched for in the test directory.
+ """
+ wheel_dir = sysconfig.get_config_var('WHEEL_PKG_DIR') or TEST_HOME_DIR
+ filenames = os.listdir(wheel_dir)
+ filenames = sorted(filenames) # sort this like ensurepip does it
+ for filename in filenames:
+ # filename is like 'pip-21.2.4-py3-none-any.whl'
+ if not filename.endswith(".whl"):
+ continue
+ prefix = pkgname + '-'
+ if filename.startswith(prefix):
+ return os.path.join(wheel_dir, filename)
+ raise FileNotFoundError(f"No wheel for {pkgname} found in {wheel_dir}")
+
+
#For recursion tests, easily exceeds default recursion limit
EXCEEDS_RECURSION_LIMIT = 5000
diff --git a/Lib/test/test_cppext.py b/Lib/test/test_cppext.py
index 4fb62d87e8..d124220dac 100644
--- a/Lib/test/test_cppext.py
+++ b/Lib/test/test_cppext.py
@@ -83,8 +83,8 @@ def run_cmd(operation, cmd):
cmd = [python, '-X', 'dev',
'-m', 'pip', 'install',
- support.findfile('setuptools-67.6.1-py3-none-any.whl'),
- support.findfile('wheel-0.40.0-py3-none-any.whl')]
+ support._findwheel('setuptools'),
+ support._findwheel('wheel')]
run_cmd('Install build dependencies', cmd)
# Build and install the C++ extension

View File

@ -19,11 +19,9 @@ not_compiled = [
'*/test/bad_coding.py',
'*/test/bad_coding2.py',
'*/test/badsyntax_*.py',
'*/test_lib2to3/data/bom.py',
'*/test_lib2to3/data/crlf.py',
'*/test_lib2to3/data/different_encoding.py',
'*/test_lib2to3/data/false_encoding.py',
'*/test_lib2to3/data/py2_test_grammar.py',
'*/test_lib2to3/data/*.py',
'*/test_lib2to3/data/*/*.py',
'*/test_lib2to3/data/*/*/*.py',
'*.debug-gdb.py',
]

View File

@ -14,23 +14,12 @@ URL: https://www.python.org/
# WARNING When rebasing to a new Python version,
# remember to update the python3-docs package as well
%global general_version %{pybasever}.0
%global prerel a2
%global prerel b2
%global upstream_version %{general_version}%{?prerel}
Version: %{general_version}%{?prerel:~%{prerel}}
Release: 1%{?dist}
Release: 3%{?dist}
License: Python-2.0.1
# Getting this build in Koji on 32bit ARM is frustrating due to technical problems
# https://pagure.io/releng/issue/11095
# Fedora 37+ dropped that architecture
# https://fedoraproject.org/wiki/Changes/RetireARMv7
# Upstream does not support it anyway
# https://peps.python.org/pep-0011/
# Hence, we exclude it starting with Python 3.12
# https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/4QWRWUYQOLCVC5D5YHXFXFOGPEIIPYSJ/
# Once Fedora 36 goes EOL, this line can be dropped.
ExcludeArch: %{arm}
# ==================================
# Conditionals controlling the build
@ -66,19 +55,76 @@ ExcludeArch: %{arm}
#
# Procedure: https://fedoraproject.org/wiki/SIGs/Python/UpgradingPython
#
# IMPORTANT: When bootstrapping, it's very likely the wheels for pip and
# setuptools are not available. Turn off the rpmwheels bcond until
# the two packages are built with wheels to get around the issue.
# IMPORTANT: When bootstrapping, it's very likely python-pip-wheel is
# not available. Turn off the rpmwheels bcond until
# python-pip is built with a wheel to get around the issue.
%bcond_with bootstrap
# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package
# Whether to use RPM build wheels from the python-{pip,setuptools,wheel}-wheel packages
# Uses upstream bundled prebuilt wheels otherwise
# Only F39+ has a pip new enough to work with Python 3.12
%if 0%{?fedora} >= 39 || 0%{?rhel} >= 10
%bcond_without rpmwheels
%else
%bcond_with rpmwheels
%endif
# If the rpmwheels condition is disabled, we use the bundled wheel packages
# from Python with the versions below.
# This needs to be manually updated when we update Python.
%global pip_version 22.3.1
%global setuptools_version 65.5.0
%global pip_version 23.1.2
%global setuptools_version 67.6.1
%global wheel_version 0.40.0
# All of those also include a list of indirect bundled libs:
# pip
# $ %%{_rpmconfigdir}/pythonbundles.py <(unzip -p Lib/ensurepip/_bundled/pip-*.whl pip/_vendor/vendor.txt)
%global pip_bundled_provides %{expand:
Provides: bundled(python3dist(cachecontrol)) = 0.12.11
Provides: bundled(python3dist(certifi)) = 2022.12.7
Provides: bundled(python3dist(chardet)) = 5.1
Provides: bundled(python3dist(colorama)) = 0.4.6
Provides: bundled(python3dist(distlib)) = 0.3.6
Provides: bundled(python3dist(distro)) = 1.8
Provides: bundled(python3dist(idna)) = 3.4
Provides: bundled(python3dist(msgpack)) = 1.0.5
Provides: bundled(python3dist(packaging)) = 21.3
Provides: bundled(python3dist(platformdirs)) = 3.2
Provides: bundled(python3dist(pygments)) = 2.14
Provides: bundled(python3dist(pyparsing)) = 3.0.9
Provides: bundled(python3dist(pyproject-hooks)) = 1
Provides: bundled(python3dist(requests)) = 2.28.2
Provides: bundled(python3dist(resolvelib)) = 1.0.1
Provides: bundled(python3dist(rich)) = 13.3.3
Provides: bundled(python3dist(setuptools)) = 67.7.2
Provides: bundled(python3dist(six)) = 1.16
Provides: bundled(python3dist(tenacity)) = 8.2.2
Provides: bundled(python3dist(tomli)) = 2.0.1
Provides: bundled(python3dist(typing-extensions)) = 4.5
Provides: bundled(python3dist(urllib3)) = 1.26.15
Provides: bundled(python3dist(webencodings)) = 0.5.1
}
# setuptools
# vendor.txt files not in .whl
# $ %%{_rpmconfigdir}/pythonbundles.py \
# <(curl -L https://github.com/pypa/setuptools/raw/v%%{setuptools_version}/setuptools/_vendor/vendored.txt) \
# <(curl -L https://github.com/pypa/setuptools/raw/v%%{setuptools_version}/pkg_resources/_vendor/vendored.txt)
%global setuptools_bundled_provides %{expand:
Provides: bundled(python3dist(importlib-metadata)) = 6
Provides: bundled(python3dist(importlib-resources)) = 5.10.2
Provides: bundled(python3dist(jaraco-text)) = 3.7
Provides: bundled(python3dist(more-itertools)) = 8.8
Provides: bundled(python3dist(ordered-set)) = 3.1.1
Provides: bundled(python3dist(packaging)) = 23
Provides: bundled(python3dist(platformdirs)) = 2.6.2
Provides: bundled(python3dist(tomli)) = 2.0.1
Provides: bundled(python3dist(typing-extensions)) = 4.0.1
Provides: bundled(python3dist(typing-extensions)) = 4.4
Provides: bundled(python3dist(zipp)) = 3.7
}
# wheel
# $ %%{_rpmconfigdir}/pythonbundles.py <(unzip -p Lib/test/wheel-*.whl wheel/vendored/vendor.txt)
%global wheel_bundled_provides %{expand:
Provides: bundled(python3dist(packaging)) = 23
}
# Expensive optimizations (mainly, profile-guided optimizations)
%bcond_without optimizations
@ -247,10 +293,13 @@ BuildRequires: /usr/bin/dtrace
BuildRequires: /usr/sbin/ifconfig
%if %{with rpmwheels}
# Newer versions in Fedora 37 support Python 3.12
# Versions in Fedora 36 were patched to add the support, in the versions listed bellow
BuildRequires: %{python_wheel_pkg_prefix}-setuptools-wheel >= 59.6.0-3
BuildRequires: %{python_wheel_pkg_prefix}-pip-wheel >= 21.3.1-4
# Python 3.12 removed the deprecated imp module,
# the first compatible version of pip is 23.1.2.
BuildRequires: %{python_wheel_pkg_prefix}-pip-wheel >= 23.1.2
%if %{with tests}
BuildRequires: %{python_wheel_pkg_prefix}-setuptools-wheel
BuildRequires: %{python_wheel_pkg_prefix}-wheel-wheel
%endif
%endif
%if %{without bootstrap}
@ -302,21 +351,7 @@ Source11: idle3.appdata.xml
# pypa/distutils integration: https://github.com/pypa/distutils/pull/70
Patch251: 00251-change-user-install-location.patch
# 00328 # 318e500c98f5e59eb1f23e0fcd32db69b9bd17e1
# Restore pyc to TIMESTAMP invalidation mode as default in rpmbuild
#
# Since Fedora 31, the $SOURCE_DATE_EPOCH is set in rpmbuild to the latest
# %%changelog date. This makes Python default to the CHECKED_HASH pyc
# invalidation mode, bringing more reproducible builds traded for an import
# performance decrease. To avoid that, we don't default to CHECKED_HASH
# when $RPM_BUILD_ROOT is set (i.e. when we are building RPM packages).
#
# See https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/57#comment-27426
# Downstream only: only used when building RPM packages
# Ideally, we should talk to upstream and explain why we don't want this
Patch328: 00328-pyc-timestamp-invalidation-mode.patch
# 00371 # 1fc313929648e9b543542de09f59c55e175ac45a
# 00371 # d917a50238c94c652bc30ae9061d65f60cc8accd
# Revert "bpo-1596321: Fix threading._shutdown() for the main thread (GH-28549) (GH-28589)"
#
# This reverts commit 38c67738c64304928c68d5c2bd78bbb01d979b94. It
@ -327,6 +362,12 @@ Patch328: 00328-pyc-timestamp-invalidation-mode.patch
# https://github.com/GrahamDumpleton/mod_wsgi/issues/730
Patch371: 00371-revert-bpo-1596321-fix-threading-_shutdown-for-the-main-thread-gh-28549-gh-28589.patch
# 00401 # 48310af24b090719553bf0e9c965d80524e0b40e
# Tests: Use setuptools+wheel from sysconfig.get_config_var('WHEEL_PKG_DIR') if set
#
# Proposed upstream https://github.com/python/cpython/pull/105056
Patch401: 00401-tests-use-setuptools-wheel-from-sysconfig-get_config_var-wheel_pkg_dir-if-set.patch
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
@ -448,11 +489,12 @@ This package contains /usr/bin/python - the "python" command that runs Python 3.
Summary: Python runtime libraries
%if %{with rpmwheels}
Requires: %{python_wheel_pkg_prefix}-setuptools-wheel >= 59.6.0-3
Requires: %{python_wheel_pkg_prefix}-pip-wheel >= 21.3.1-4
Requires: %{python_wheel_pkg_prefix}-pip-wheel >= 23.1.2
%else
Provides: bundled(python3dist(pip)) = %{pip_version}
Provides: bundled(python3dist(setuptools)) = %{setuptools_version}
%pip_bundled_provides
# License manually combined form Python + pip
License: Python-2.0.1 AND MIT AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND LGPL-2.1-only AND MPL-2.0 AND (Apache-2.0 OR BSD-2-Clause)
%endif
%unversioned_obsoletes_of_python3_X_if_main libs
@ -486,7 +528,11 @@ Requires: %{pkgname}-libs%{?_isa} = %{version}-%{release}
# But we want them when packages BuildRequire python3-devel
Requires: (python-rpm-macros if rpm-build)
Requires: (python3-rpm-macros if rpm-build)
Requires: (pyproject-rpm-macros if rpm-build)
# We omit this dependency on RHEL to avoid pulling the macros to AppStream:
# RHEL users can use the minimal implementation of %%pyproject_buildrequires
# from pyproject-srpm-macros instead.
# On Fedora, we keep this to avoid one additional round of %%generate_buildrequires.
%{!?rhel:Requires: (pyproject-rpm-macros if rpm-build)}
%unversioned_obsoletes_of_python3_X_if_main devel
@ -567,6 +613,18 @@ Summary: The self-test suite for the main python3 package
Requires: %{pkgname} = %{version}-%{release}
Requires: %{pkgname}-libs%{?_isa} = %{version}-%{release}
%if %{with rpmwheels}
Requires: %{python_wheel_pkg_prefix}-setuptools-wheel
Requires: %{python_wheel_pkg_prefix}-wheel-wheel
%else
Provides: bundled(python3dist(setuptools)) = %{setuptools_version}
%setuptools_bundled_provides
Provides: bundled(python3dist(wheel)) = %{wheel_version}
%wheel_bundled_provides
# License manually combined from Python + setuptools + wheel
License: Python-2.0.1 AND MIT AND Apache-2.0 AND (Apache-2.0 OR BSD-2-Clause)
%endif
%unversioned_obsoletes_of_python3_X_if_main test
%description -n %{pkgname}-test
@ -619,9 +677,18 @@ The debug runtime additionally supports debug builds of C-API extensions
%gpgverify -k2 -s1 -d0
%autosetup -S git_am -n Python-%{upstream_version}
# Verify the second level of bundled provides is up to date
# Arguably this should be done in %%check, but %%prep has a faster feedback loop
# setuptools.whl does not contain the vendored.txt files
if [ -f %{_rpmconfigdir}/pythonbundles.py ]; then
%{_rpmconfigdir}/pythonbundles.py <(unzip -p Lib/ensurepip/_bundled/pip-*.whl pip/_vendor/vendor.txt) --compare-with '%pip_bundled_provides'
%{_rpmconfigdir}/pythonbundles.py <(unzip -p Lib/test/wheel-*.whl wheel/vendored/vendor.txt) --compare-with '%wheel_bundled_provides'
fi
%if %{with rpmwheels}
rm Lib/ensurepip/_bundled/pip-%{pip_version}-py3-none-any.whl
rm Lib/ensurepip/_bundled/setuptools-%{setuptools_version}-py3-none-any.whl
rm Lib/test/setuptools-%{setuptools_version}-py3-none-any.whl
rm Lib/test/wheel-%{wheel_version}-py3-none-any.whl
%endif
# Remove all exe files to ensure we are not shipping prebuilt binaries
@ -945,15 +1012,25 @@ find . -name "*~" -exec rm -f {} \;
# Python CMD line options:
# -s - don't add user site directory to sys.path
# -B - don't write .pyc files on import
# Clamp the source mtime first, see https://fedoraproject.org/wiki/Changes/ReproducibleBuildsClampMtimes
# The clamp_source_mtime module is only guaranteed to exist on Fedoras that enabled this option:
%if 0%{?clamp_mtime_to_source_date_epoch}
LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
PYTHONPATH="%{_rpmconfigdir}/redhat" \
%{buildroot}%{_bindir}/python%{pybasever} -s -B -m clamp_source_mtime %{buildroot}%{pylibdir}
%endif
# compileall CMD line options:
# -f - force rebuild even if timestamps are up to date
# -o - optimization levels to run compilation with
# -s - part of path to left-strip from path to source file (buildroot)
# -p - path to add as prefix to path to source file (/ to make it absolute)
# --hardlink-dupes - hardlink different optimization level pycs together if identical (saves space)
# --invalidation-mode - we prefer the timestamp invalidation mode for performance reasons
# -x - skip test modules with SyntaxErrors (taken from the Makefile)
LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
%{buildroot}%{_bindir}/python%{pybasever} -s -B -m compileall \
-f %{_smp_mflags} -o 0 -o 1 -o 2 -s %{buildroot} -p / %{buildroot} --hardlink-dupes || :
-f %{_smp_mflags} -o 0 -o 1 -o 2 -s %{buildroot} -p / %{buildroot} --hardlink-dupes --invalidation-mode=timestamp \
-x 'bad_coding|badsyntax|site-packages|test/test_lib2to3/data'
# Turn this BRP off, it is done by compileall2 --hardlink-dupes above
%global __brp_python_hardlink %{nil}
@ -1064,13 +1141,13 @@ CheckPython() {
LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.pythoninfo
# Run the upstream test suite
# --timeout=1800: kill test running for longer than 30 minutes
# --timeout=2700: kill test running for longer than 45 minutes
# test_freeze_simple_script is skipped, because it fails without bundled libs.
# the freeze tool is only usable from the source checkout anyway,
# we don't ship it in the RPM package.
LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \
-wW --slowest -j0 --timeout=1800 \
-wW --slowest %{_smp_mflags} --timeout=2700 \
-i test_freeze_simple_script \
%ifarch %{mips64}
-x test_ctypes \
@ -1151,7 +1228,6 @@ CheckPython optimized
%else
%dir %{pylibdir}/ensurepip/_bundled
%{pylibdir}/ensurepip/_bundled/pip-%{pip_version}-py3-none-any.whl
%{pylibdir}/ensurepip/_bundled/setuptools-%{setuptools_version}-py3-none-any.whl
%endif
%dir %{pylibdir}/concurrent/
@ -1169,9 +1245,8 @@ CheckPython optimized
%{dynload_dir}/_blake2.%{SOABI_optimized}.so
%{dynload_dir}/_md5.%{SOABI_optimized}.so
%{dynload_dir}/_sha1.%{SOABI_optimized}.so
%{dynload_dir}/_sha256.%{SOABI_optimized}.so
%{dynload_dir}/_sha2.%{SOABI_optimized}.so
%{dynload_dir}/_sha3.%{SOABI_optimized}.so
%{dynload_dir}/_sha512.%{SOABI_optimized}.so
%{dynload_dir}/_asyncio.%{SOABI_optimized}.so
%{dynload_dir}/_bisect.%{SOABI_optimized}.so
@ -1211,7 +1286,6 @@ CheckPython optimized
%{dynload_dir}/_ssl.%{SOABI_optimized}.so
%{dynload_dir}/_statistics.%{SOABI_optimized}.so
%{dynload_dir}/_struct.%{SOABI_optimized}.so
%{dynload_dir}/_typing.%{SOABI_optimized}.so
%{dynload_dir}/array.%{SOABI_optimized}.so
%{dynload_dir}/audioop.%{SOABI_optimized}.so
%{dynload_dir}/binascii.%{SOABI_optimized}.so
@ -1323,6 +1397,11 @@ CheckPython optimized
%{pylibdir}/urllib
%{pylibdir}/xml
%dir %{pylibdir}/zipfile/
%{pylibdir}/zipfile/*.py
%{pylibdir}/zipfile/__pycache__/*%{bytecode_suffixes}
%{pylibdir}/zoneinfo
%dir %{pylibdir}/__phello__
@ -1357,7 +1436,7 @@ CheckPython optimized
%{_includedir}/python%{LDVERSION_optimized}/*.h
%{_includedir}/python%{LDVERSION_optimized}/internal/
%{_includedir}/python%{LDVERSION_optimized}/cpython/
%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit
%doc Misc/README.valgrind Misc/valgrind-python.supp
%if %{with main_python}
%{_bindir}/2to3
@ -1418,10 +1497,12 @@ CheckPython optimized
%{dynload_dir}/_ctypes_test.%{SOABI_optimized}.so
%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so
%{dynload_dir}/_testcapi.%{SOABI_optimized}.so
%{dynload_dir}/_testclinic.%{SOABI_optimized}.so
%{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so
%{dynload_dir}/_testinternalcapi.%{SOABI_optimized}.so
%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so
%{dynload_dir}/_testsinglephase.%{SOABI_optimized}.so
%{dynload_dir}/_xxinterpchannels.%{SOABI_optimized}.so
%{dynload_dir}/_xxtestfuzz.%{SOABI_optimized}.so
# We don't bother splitting the debug build out into further subpackages:
@ -1446,9 +1527,8 @@ CheckPython optimized
%{dynload_dir}/_blake2.%{SOABI_debug}.so
%{dynload_dir}/_md5.%{SOABI_debug}.so
%{dynload_dir}/_sha1.%{SOABI_debug}.so
%{dynload_dir}/_sha256.%{SOABI_debug}.so
%{dynload_dir}/_sha2.%{SOABI_debug}.so
%{dynload_dir}/_sha3.%{SOABI_debug}.so
%{dynload_dir}/_sha512.%{SOABI_debug}.so
%{dynload_dir}/_asyncio.%{SOABI_debug}.so
%{dynload_dir}/_bisect.%{SOABI_debug}.so
@ -1488,7 +1568,6 @@ CheckPython optimized
%{dynload_dir}/_ssl.%{SOABI_debug}.so
%{dynload_dir}/_statistics.%{SOABI_debug}.so
%{dynload_dir}/_struct.%{SOABI_debug}.so
%{dynload_dir}/_typing.%{SOABI_debug}.so
%{dynload_dir}/array.%{SOABI_debug}.so
%{dynload_dir}/audioop.%{SOABI_debug}.so
%{dynload_dir}/binascii.%{SOABI_debug}.so
@ -1544,10 +1623,12 @@ CheckPython optimized
%{dynload_dir}/_ctypes_test.%{SOABI_debug}.so
%{dynload_dir}/_testbuffer.%{SOABI_debug}.so
%{dynload_dir}/_testcapi.%{SOABI_debug}.so
%{dynload_dir}/_testclinic.%{SOABI_debug}.so
%{dynload_dir}/_testimportmultiple.%{SOABI_debug}.so
%{dynload_dir}/_testinternalcapi.%{SOABI_debug}.so
%{dynload_dir}/_testmultiphase.%{SOABI_debug}.so
%{dynload_dir}/_testsinglephase.%{SOABI_debug}.so
%{dynload_dir}/_xxinterpchannels.%{SOABI_debug}.so
%{dynload_dir}/_xxtestfuzz.%{SOABI_debug}.so
%{pylibdir}/_sysconfigdata_%{ABIFLAGS_debug}_linux_%{platform_triplet}.py
@ -1576,6 +1657,46 @@ CheckPython optimized
# ======================================================
%changelog
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 3.12.0~b2-3
- Rebuilt for Python 3.12
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 3.12.0~b2-2
- Bootstrap for Python 3.12
* Wed Jun 07 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~b2-1
- Update to 3.12.0b2
* Mon May 29 2023 Miro Hrončok <mhroncok@redhat.com> - 3.12.0~b1-2
- Use wheels from RPMs, at least on Fedora 39+
- On older Fedora releases, declare bundled() provides and a complex License tag
* Tue May 23 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~b1-1
- Update to 3.12.0b1
* Wed Apr 05 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~a7-1
- Update to 3.12.0a7
* Thu Mar 23 2023 Miro Hrončok <mhroncok@redhat.com> - 3.12.0~a6-2
- Increase the test timeout during package build
* Wed Mar 08 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~a6-1
- Update to 3.12.0a6
* Wed Feb 08 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~a5-1
- Update to 3.12.0a5
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.12.0~a4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Jan 11 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~a4-1
- Update to 3.12.0a4
* Mon Dec 19 2022 Miro Hrončok <mhroncok@redhat.com> - 3.12.0~a3-2
- No longer patch the default bytecode cache invalidation policy
* Wed Dec 07 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~a3-1
- Update to 3.12.0a3
* Tue Nov 15 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~a2-1
- Update to 3.12.0a2
- Fixes: rhbz#2133847

View File

@ -1,2 +1,2 @@
SHA512 (Python-3.12.0a2.tar.xz) = 0f830fdb514078c5403727b31fd81912382eca4decb52ae9bfb0f00b8a007be9f8e29bad349034ec97e2229f60fe0baae417227413350485d747d31f4567d5c1
SHA512 (Python-3.12.0a2.tar.xz.asc) = f0c22e071c68d648c8cf2823647f0c807db41b81b94b8100b50d2049a47f19475a4323c5ac488eb5a3798f942978054f358090c1e460804232bb46093fb3fd55
SHA512 (Python-3.12.0b2.tar.xz) = 9bfac70f2ccc1f6798bc63a55d92f0b162e3a9077624a2e37448002ea310cb7b1da64ad2aceda795b45de91f60eb4d95dde85984900e54906d814625b42143b5
SHA512 (Python-3.12.0b2.tar.xz.asc) = 22a1f2c3335bc428cfee0ce2e081aeed24474d3cd877fac1cc4cf92b4a2bee70f85aed0068a71600cddef9c8b46bbde257a92c57bd494ad820c0686ab7c8c0f0

View File

@ -21,13 +21,13 @@
run: rpm -qa
- smoke:
dir: python/smoke
run: "VERSION={{ pybasever }} ./venv.sh"
run: "VERSION={{ pybasever }} CYTHON=false ./venv.sh"
- smoke_virtualenv:
dir: python/smoke
run: "VERSION={{ pybasever }} METHOD=virtualenv ./venv.sh"
run: "VERSION={{ pybasever }} METHOD=virtualenv CYTHON=false ./venv.sh"
- debugsmoke:
dir: python/smoke
run: "PYTHON=python{{ pybasever }}d TOX=false VERSION={{ pybasever }} ./venv.sh"
run: "PYTHON=python{{ pybasever }}d TOX=false VERSION={{ pybasever }} CYTHON=false ./venv.sh"
- selftest:
dir: python/selftest
run: "VERSION={{ pybasever }} X='' ./parallel.sh"