Python includes a lot of differently licensed functions and
modules.
We gather the list from https://docs.python.org/3.14/license.html.
Detect changes to Doc/license.rst with file hash automatically in %prep.
We always switch rpmswheels, optimizations and tests when bootstrapping
new Python version, so they can be tied to the bootstrap conditional.
With that, switching the bootstrap in Koji side tag will be possible,
letting us to avoid separate "bootstrap" and "rebuild" commits.
We need to have it above the Release field, in order for the build NVR
to contain the ~bootstrap suffix and sort correctly (lower than the main
build).
This enables bootstrapping the package directly in Koji side tag.
Perf profiling showing the Python functions is only
supported on x86_64 and aarch64 at the moment.
Adding perf as a BuildRequires allows tests that utilize the
perf binary to run.
Shebangs are mangled from #!/bin/bash to #!/usr/bin/bash, which causes
the change in data_offset calculated in tests, resulting in a
test_zipfile failure:
FAIL: test_data_offset_with_exe_prepended
(test.test_zipfile.test_core.TestDataOffsetPrependedZip.test_data_offset_with_exe_prepended)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.14/test/test_zipfile/test_core.py", line
3431, in test_data_offset_with_exe_prepended
self._test_data_offset(self.exe_zip)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/usr/lib64/python3.14/test/test_zipfile/test_core.py",
line 3428, in _test_data_offset
self.assertEqual(zipfp.data_offset, 713)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 717 != 713
This makes it easier for the package manager to determine "already broken" weak dependency.
When Python is updated, the Recommends now remain identical, rather than being "new".
Note that I don't know if dnf currently treats weak dependencies this way,
but the assumption is that it *might*.
The reverse dependency is versioned anyway, so the constraint is not necessary.
Intentionally not bumping the release, this can land with the next update.
Before:
$ python3.14 -m timeit -s 'import sysconfig' 'sysconfig.get_paths()'
2000 loops, best of 5: 157 usec per loop
$ python3.14 -m timeit -s 'import sysconfig' 'sysconfig.get_paths()'
2000 loops, best of 5: 162 usec per loop
$ python3.14 -m timeit -s 'import sysconfig' 'sysconfig.get_paths()'
1000 loops, best of 5: 146 usec per loop
After:
$ python3.14 -m timeit -s 'import sysconfig' 'sysconfig.get_paths()'
5000 loops, best of 5: 75.9 usec per loop
$ python3.14 -m timeit -s 'import sysconfig' 'sysconfig.get_paths()'
5000 loops, best of 5: 77.1 usec per loop
$ python3.14 -m timeit -s 'import sysconfig' 'sysconfig.get_paths()'
5000 loops, best of 5: 76.2 usec per loop
This can be shipped together with the next alpha release.