import python-wheel-0.33.6-5.module+el8.3.0+7187+a27ec44b

This commit is contained in:
CentOS Sources 2020-07-28 05:31:26 -04:00 committed by Stepan Oksanichenko
parent fcef94c5e7
commit 2b47e6bed1

View File

@ -8,7 +8,7 @@
Name: python-%{pypi_name}
Version: 0.33.6
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Built-package format for Python
License: MIT
@ -48,6 +48,11 @@ BuildRequires: python%{python3_pkgversion}-pytest
%endif
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
# python38 installs the alternatives master symlink to which we attach a slave
Requires: python38
Requires(post): python38
Requires(postun): python38
%description -n python%{python3_pkgversion}-%{pypi_name} %{_description}
Python 3 version.
@ -80,6 +85,8 @@ test -s wheel/cli/install.py || echo "# empty" > wheel/cli/install.py
%install
%py3_install
mv %{buildroot}%{_bindir}/%{pypi_name}{,-%{python3_version}}
# Create an empty file to be used by `alternatives`
touch %{buildroot}%{_bindir}/%{pypi_name}-3
%if %{without bootstrap}
mkdir -p %{buildroot}%{python_wheeldir}
@ -93,10 +100,26 @@ rm setup.cfg
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3.8 -v --ignore build
%endif
%post -n python%{python3_pkgversion}-%{pypi_name}
alternatives --add-slave python3 %{_bindir}/python%{python3_version} \
%{_bindir}/%{pypi_name}-3 \
%{pypi_name}-3 \
%{_bindir}/%{pypi_name}-%{python3_version}
%postun -n python%{python3_pkgversion}-%{pypi_name}
# Do this only during uninstall process (not during update)
if [ $1 -eq 0 ]; then
alternatives --remove-slave python3 %{_bindir}/python%{python3_version} \
%{pypi_name}-3
fi
%files -n python%{python3_pkgversion}-%{pypi_name}
%license LICENSE.txt
%doc README.rst
%{_bindir}/%{pypi_name}-%{python3_version}
%ghost %{_bindir}/%{pypi_name}-3
%{python3_sitelib}/%{pypi_name}*
%if %{without bootstrap}
@ -108,6 +131,10 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3.8 -v --ignore build
%endif
%changelog
* Mon Mar 09 2020 Tomas Orsava <torsava@redhat.com> - 0.33.6-5
- Implement the alternatives system for the executables
- Resolves: rhbz#1807041
* Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 0.33.6-4
- Exclude unsupported i686 arch