From 2c17e79de661a0b2b5f0c9740e47b98298eae4c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 10 Feb 2023 17:56:48 +0100 Subject: [PATCH] Fixup the bootstrap build and make tests depend on it --- python-setuptools.spec | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/python-setuptools.spec b/python-setuptools.spec index 6fc726a..dfddc92 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -1,18 +1,18 @@ %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 # of the packages in Fedora ELN. Hence we disable tests and documentation here # to prevent pulling many unwanted packages in. # We intentionally keep this enabled on EPEL. -%bcond tests %[%{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 +%bcond tests %[%{without bootstrap} && (%{defined fedora} || %{defined epel})] %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 -# 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 -%{_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} # Regression test, the wheel should not be larger than 900 kB