Fixup the bootstrap build and make tests depend on it

This commit is contained in:
Miro Hrončok 2023-02-10 17:56:48 +01:00
parent 368763e1d8
commit 2c17e79de6

View File

@ -1,18 +1,18 @@
%global srcname setuptools %global srcname setuptools
# used when bootstrapping new Python versions
%bcond bootstrap 0
# Similar to what we have in pythonX.Y.spec files.
# If enabled, provides unversioned executables and other stuff.
# Disable it if you build this package in an alternative stack.
%bcond main_python 1
# The original RHEL N+1 content set is defined by (build)dependencies # The original RHEL N+1 content set is defined by (build)dependencies
# of the packages in Fedora ELN. Hence we disable tests and documentation here # of the packages in Fedora ELN. Hence we disable tests and documentation here
# to prevent pulling many unwanted packages in. # to prevent pulling many unwanted packages in.
# We intentionally keep this enabled on EPEL. # We intentionally keep this enabled on EPEL.
%bcond tests %[%{defined fedora} || %{defined epel}] %bcond tests %[%{without bootstrap} && (%{defined fedora} || %{defined epel})]
# WARNING When bootstrapping, disable tests as well,
# because tests need pip.
%bcond_with bootstrap
# Similar to what we have in pythonX.Y.spec files.
# If enabled, provides unversioned executables and other stuff.
# Disable it if you build this package in an alternative stack.
%bcond_without main_python
%global python_wheel_name %{srcname}-%{version}-py3-none-any.whl %global python_wheel_name %{srcname}-%{version}-py3-none-any.whl
@ -171,9 +171,9 @@ install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_w
%check %check
# Verify bundled provides are up to date # Verify bundled provides are up to date, pythonbundles.py uses pkg_resources from $PWD
cat pkg_resources/_vendor/vendored.txt setuptools/_vendor/vendored.txt > allvendor.txt cat pkg_resources/_vendor/vendored.txt setuptools/_vendor/vendored.txt > allvendor.txt
%{_rpmconfigdir}/pythonbundles.py allvendor.txt --namespace 'python%{python3_pkgversion}dist' --compare-with '%{bundled}' PYTHONPATH=. %{_rpmconfigdir}/pythonbundles.py allvendor.txt --namespace 'python%{python3_pkgversion}dist' --compare-with '%{bundled}'
%if %{without bootstrap} %if %{without bootstrap}
# Regression test, the wheel should not be larger than 900 kB # Regression test, the wheel should not be larger than 900 kB