| |
@@ -4,6 +4,10 @@
|
| |
# because tests need pip.
|
| |
%bcond_with bootstrap
|
| |
%bcond_without tests
|
| |
+ # 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
|
| |
|
| |
%if %{without bootstrap}
|
| |
%global python_wheelname %{srcname}-%{version}-py3-none-any.whl
|
| |
@@ -32,18 +36,18 @@
|
| |
|
| |
BuildRequires: gcc
|
| |
|
| |
- BuildRequires: python3-devel
|
| |
+ BuildRequires: python%{python3_pkgversion}-devel
|
| |
%if %{with tests}
|
| |
- BuildRequires: python3-pip
|
| |
- BuildRequires: python3-pytest
|
| |
- BuildRequires: python3-mock
|
| |
- BuildRequires: python3-pytest-fixture-config
|
| |
- BuildRequires: python3-pytest-virtualenv
|
| |
- BuildRequires: python3-jaraco-envs
|
| |
+ BuildRequires: python%{python3_pkgversion}-pip
|
| |
+ BuildRequires: python%{python3_pkgversion}-pytest
|
| |
+ BuildRequires: python%{python3_pkgversion}-mock
|
| |
+ BuildRequires: python%{python3_pkgversion}-pytest-fixture-config
|
| |
+ BuildRequires: python%{python3_pkgversion}-pytest-virtualenv
|
| |
+ BuildRequires: python%{python3_pkgversion}-jaraco-envs
|
| |
%endif # with tests
|
| |
%if %{without bootstrap}
|
| |
- BuildRequires: python3-pip
|
| |
- BuildRequires: python3-wheel
|
| |
+ BuildRequires: python%{python3_pkgversion}-pip
|
| |
+ BuildRequires: python%{python3_pkgversion}-wheel
|
| |
# python3 bootstrap: this is built before the final build of python3, which
|
| |
# adds the dependency on python3-rpm-generators, so we require it manually
|
| |
# The minimal version is for bundled provides verification script
|
| |
@@ -60,17 +64,16 @@
|
| |
|
| |
# Virtual provides for the packages bundled by setuptools.
|
| |
# You can generate it with:
|
| |
- # %%{_rpmconfigdir}/pythonbundles.py pkg_resources/_vendor/vendored.txt
|
| |
+ # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{python3_pkgversion}dist' pkg_resources/_vendor/vendored.txt
|
| |
%global bundled %{expand:
|
| |
- Provides: bundled(python3dist(appdirs)) = 1.4.3
|
| |
- Provides: bundled(python3dist(packaging)) = 20.4
|
| |
- Provides: bundled(python3dist(pyparsing)) = 2.2.1
|
| |
- Provides: bundled(python3dist(six)) = 1.10
|
| |
+ Provides: bundled(python%{python3_pkgversion}dist(appdirs)) = 1.4.3
|
| |
+ Provides: bundled(python%{python3_pkgversion}dist(packaging)) = 20.4
|
| |
+ Provides: bundled(python%{python3_pkgversion}dist(pyparsing)) = 2.2.1
|
| |
+ Provides: bundled(python%{python3_pkgversion}dist(six)) = 1.10
|
| |
}
|
| |
|
| |
- %package -n python3-setuptools
|
| |
+ %package -n python%{python3_pkgversion}-setuptools
|
| |
Summary: Easily build and distribute Python 3 packages
|
| |
- Conflicts: python-setuptools < %{version}-%{release}
|
| |
%{bundled}
|
| |
|
| |
%if %{with bootstrap}
|
| |
@@ -79,7 +82,7 @@
|
| |
%endif
|
| |
|
| |
|
| |
- %description -n python3-setuptools
|
| |
+ %description -n python%{python3_pkgversion}-setuptools
|
| |
Setuptools is a collection of enhancements to the Python 3 distutils that allow
|
| |
you to more easily build and distribute Python 3 packages, especially ones that
|
| |
have dependencies on other packages.
|
| |
@@ -148,6 +151,9 @@
|
| |
install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir}
|
| |
%endif
|
| |
|
| |
+ %if %{without main_python}
|
| |
+ rm %{buildroot}%{_bindir}/easy_install
|
| |
+ %endif
|
| |
|
| |
%if %{with tests}
|
| |
%check
|
| |
@@ -161,7 +167,7 @@
|
| |
%endif # with tests
|
| |
|
| |
|
| |
- %files -n python3-setuptools
|
| |
+ %files -n python%{python3_pkgversion}-setuptools
|
| |
%license LICENSE
|
| |
%doc docs/* CHANGES.rst README.rst
|
| |
%{python3_sitelib}/easy_install.py
|
| |
@@ -170,7 +176,9 @@
|
| |
%{python3_sitelib}/_distutils_hack/
|
| |
%{python3_sitelib}/distutils-precedence.pth
|
| |
%{python3_sitelib}/__pycache__/*
|
| |
+ %if %{with main_python}
|
| |
%{_bindir}/easy_install
|
| |
+ %endif
|
| |
%{_bindir}/easy_install-3.*
|
| |
|
| |
%if %{without bootstrap}
|
| |
Two changes to make setuptools ready for alternative python stacks:
3
bcond main_python
to disable unversioned parts which only the main package should shipThe only remaining problematic thing is the name of -wheel subpackage which should be also renamed to have a versioned prefix but because we'll rename the whole component, this will have to be fixed manually.
I can confirm that python3.8-setuptools[-wheel] are installable side-by-side with the main packages from rawhide. My plan is to prepare similar changes for pip and wheel and maybe other important packages.