diff --git a/SPECS/python-pip.spec b/SPECS/python-pip.spec index 4cea8d2..bd157f9 100644 --- a/SPECS/python-pip.spec +++ b/SPECS/python-pip.spec @@ -15,14 +15,13 @@ %global srcname pip %global base_version 21.2.3 %global upstream_version %{base_version}%{?prerel} -%global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl -%global python_wheeldir %{_datadir}/python-wheels +%global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl %global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 3%{?dist} +Release: 5%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -228,16 +227,23 @@ A documentation for a tool for installing and managing Python packages %endif -%package wheel +%package -n %{python_wheel_pkg_prefix}-%{srcname}-wheel Summary: The pip wheel Requires: ca-certificates +Provides: %{name}-wheel = %{version}-%{release} +Obsoletes: %{name}-wheel < %{version}-%{release} + +# Older versions of python3-libs expect Python wheels at the old unversioned +# location, so we conflict with the old Python versions that wouldn't work with +# the new wheel location. +Conflicts: python3-libs < 3.9.9-2 # Virtual provides for the packages bundled by pip: %{bundled 3} %{crypt_compat_recommends 3} -%description wheel +%description -n %{python_wheel_pkg_prefix}-%{srcname}-wheel A Python wheel of pip to use with venv. %prep @@ -254,7 +260,7 @@ sed -i '/html_theme = "furo"/d' docs/html/conf.py sed -i '/"sphinxcontrib.towncrier",/d' docs/html/conf.py # tests expect wheels in here -ln -s %{python_wheeldir} tests/data/common_wheels +ln -s %{python_wheel_dir} tests/data/common_wheels # Remove shebang from files in bundled chardet grep -lr "^#\!/usr/bin/env python" src/pip/_vendor/chardet/ | xargs sed -i "1d" @@ -280,7 +286,7 @@ rm -rf docs/build/html/{.doctrees,.buildinfo} # /usr/bin/pip yet, so we install using the wheel directly. # (This is not standard wheel usage, but the pip wheel supports it -- see # pip/__main__.py) -%{python3} dist/%{python_wheelname}/pip install \ +%{python3} dist/%{python_wheel_name}/pip install \ --root %{buildroot} \ --no-deps \ --disable-pip-version-check \ @@ -331,8 +337,8 @@ ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 echo rpm > %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/INSTALLER rm %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/RECORD -mkdir -p %{buildroot}%{python_wheeldir} -install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} +mkdir -p %{buildroot}%{python_wheel_dir} +install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} %if %{with tests} @@ -390,13 +396,22 @@ pytest_k='not completion and %doc docs/build/html %endif -%files wheel +%files -n %{python_wheel_pkg_prefix}-%{srcname}-wheel %license LICENSE.txt # we own the dir for simplicity -%dir %{python_wheeldir}/ -%{python_wheeldir}/%{python_wheelname} +%dir %{python_wheel_dir}/ +%{python_wheel_dir}/%{python_wheel_name} %changelog +* Wed Nov 24 2021 Tomas Orsava - 21.2.3-5 +- Conflict with old Python versions that use the old unversioned wheel location +- Resolves: rhbz#1982668 + +* Wed Sep 22 2021 Tomas Orsava - 21.2.3-4 +- Make the python-pip-wheel subpackage versioned (python3-pip-wheel), + and move its contents to a versioned directory /usr/share/python3-wheels +- Resolves: rhbz#1982668 + * Wed Oct 06 2021 Charalampos Stratakis - 21.2.3-3 - Remove bundled windows executables - Resolves: rhbz#2006795