Switch the basic conditionals based on the bootstrap's value

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.
This commit is contained in:
Karolina Surma 2025-06-25 12:27:09 +02:00
commit f31a75016f

View file

@ -10,20 +10,25 @@
#
# Procedure: https://fedoraproject.org/wiki/SIGs/Python/UpgradingPython
#
# 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.
# Bootstrap enabled:
# - disables regen-all with the same Python version
# - disables dependency on python3-rpm-generators if we build with main_python
# - disables rpmwheels, optimizations and tests by default
%bcond bootstrap 0
# Whether to use RPM build wheels from the python-{pip,setuptools,wheel}-wheel packages
# Uses upstream bundled prebuilt wheels otherwise
%bcond rpmwheels 1
%bcond rpmwheels %{without bootstrap}
# Expensive optimizations (mainly, profile-guided optimizations)
%bcond optimizations 1
# We don't have to switch it off for bootstrap, but it speeds up the first build,
# so we opt to only run them during the "full" build
%bcond optimizations %{without bootstrap}
# Run the test suite in %%check
%bcond tests 1
# Technically, we can run the tests even during the bootstrap build, but since
# we build Python 2x, it's better to just run it once with the "full" build
%bcond tests %{without bootstrap}
# ==================
# Top-level metadata