In the past we have had a versioned requirement on expat, e.g.:
https://src.fedoraproject.org/rpms/python3.13/c/c686992b6c25a39d0e4117053ddb669fd5998723
The explanation is still valid: if Python is built with an expat version
with new symbols, and used with an installed older expat, it won't work,
preventing crating new venvs, and many more.
This has happened again now with expat 2.7.2 introducing new symbols.
Reintroduce the versioned requirement and make it future-proof - the
generated version will always match at least the one present in the buildroot
during the Python build.
Python includes a lot of differently licensed functions and modules.
We gather the list from https://docs.python.org/3.13/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.
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
The results are inconclusive on 3.13,
but we want the patch to be identical (if possible).
This can be shipped with the next update.