| |
@@ -45,6 +45,17 @@
|
| |
BuildRequires: python3-rpm-generators
|
| |
%endif # without bootstrap
|
| |
|
| |
+ # Virtual provides for the packages bundled by setuptools.
|
| |
+ # You can find the versions in setuptools/setuptools/_vendor/vendored.txt
|
| |
+ # Use this source to generate the list:
|
| |
+ Source9: bundled_provides.py
|
| |
+ %global bundled %{expand:
|
| |
+ Provides: bundled(python3dist(appdirs)) = 1.4.3
|
| |
+ Provides: bundled(python3dist(packaging)) = 16.8
|
| |
+ Provides: bundled(python3dist(pyparsing)) = 2.2.1
|
| |
+ Provides: bundled(python3dist(six)) = 1.10
|
| |
+ }
|
| |
+
|
| |
%description
|
| |
Setuptools is a collection of enhancements to the Python distutils that allow
|
| |
you to more easily build and distribute Python packages, especially ones that
|
| |
@@ -53,15 +64,6 @@
|
| |
This package also contains the runtime components of setuptools, necessary to
|
| |
execute the software that requires pkg_resources.
|
| |
|
| |
- # Virtual provides for the packages bundled by setuptools.
|
| |
- # You can find the versions in setuptools/setuptools/_vendor/vendored.txt
|
| |
- %global bundled %{expand:
|
| |
- Provides: bundled(python3dist(packaging)) = 16.8
|
| |
- Provides: bundled(python3dist(pyparsing)) = 2.2.1
|
| |
- Provides: bundled(python3dist(six)) = 1.10.0
|
| |
- Provides: bundled(python3dist(appdirs)) = 1.4.3
|
| |
- }
|
| |
-
|
| |
%package -n python3-setuptools
|
| |
Summary: Easily build and distribute Python 3 packages
|
| |
Conflicts: python-setuptools < %{version}-%{release}
|
| |
@@ -142,8 +144,11 @@
|
| |
%endif
|
| |
|
| |
|
| |
- %if %{with tests}
|
| |
%check
|
| |
+ # Assert the bundled provides are up to date
|
| |
+ %{python3} %{SOURCE9} . '%{bundled}'
|
| |
+
|
| |
+ %if %{with tests}
|
| |
# --ignore=pavement.py:
|
| |
# pavement.py is only used by upstream to do releases and vendoring, we don't ship it
|
| |
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) pytest-%{python3_version} \
|
| |
We repeatadly forget to update the list of bundled provides.
This is a proof of concept of validating the provides in %check
with a Python script.
If we like he idea, we can make the script more general,
package it to python-rpm-macros and reuse it in setuptools, pip, pipenv...