When the SRPM is built in Koji on non-JIT architecture (such as ppc64le
or s390x), the jit_build_stencils bcond is set to false.
When we don't have the JIT stencils sources yet and we do a scratch
build to generate them,
we want the SRPM creation to succeed, regardless of architecture.
This way, the sources are only defined when they are required or when
they exist.
An alternative would be to set jit_build_stencils to true/false
in an arch-independent way, and later always check for:
%{with jit} && %{with jit_build_stencils}
But I think that might be confusing.
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.
Only define the JIT stencils sources when we must
(i.e. when building --wihtout jit_build_stencils)
or when the files already exist.
This allows to run rawhide CI scratch builds without the stencils,
but it also ensures the final SRPM contains them
even when built --with jit_build_stencils.
(cherry picked from python3.15 commit b2312d171d6a3280744a549f2c4daee492b66f44)
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