|
|
|
@ -21,7 +21,7 @@
|
|
|
|
|
|
|
|
|
|
Name: python%{python3_pkgversion}-%{pypi_name}
|
|
|
|
|
Version: 0.38.4
|
|
|
|
|
Release: 3%{?dist}
|
|
|
|
|
Release: 4%{?dist}
|
|
|
|
|
Summary: Built-package format for Python
|
|
|
|
|
|
|
|
|
|
# packaging is ASL 2.0 or BSD
|
|
|
|
@ -54,6 +54,15 @@ Provides: bundled(python%{python3_version}dist(packaging)) = 21.3
|
|
|
|
|
|
|
|
|
|
%{bundled}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Require alternatives version that implements the --keep-foreign flag
|
|
|
|
|
Requires(postun): alternatives >= 1.19.1-1
|
|
|
|
|
|
|
|
|
|
# python3.11 installs the alternatives master symlink to which we attach a slave
|
|
|
|
|
Requires: python%{python3_pkgversion}
|
|
|
|
|
Requires(post): python%{python3_pkgversion}
|
|
|
|
|
Requires(postun): python%{python3_pkgversion}
|
|
|
|
|
|
|
|
|
|
%global _description %{expand:
|
|
|
|
|
Wheel is the reference implementation of the Python wheel packaging standard,
|
|
|
|
|
as defined in PEP 427.
|
|
|
|
@ -91,6 +100,8 @@ mv %{buildroot}%{_bindir}/%{pypi_name}{,-%{python3_version}}
|
|
|
|
|
ln -s %{pypi_name}-%{python3_version} %{buildroot}%{_bindir}/%{pypi_name}-3
|
|
|
|
|
ln -s %{pypi_name}-3 %{buildroot}%{_bindir}/%{pypi_name}
|
|
|
|
|
%endif
|
|
|
|
|
# Create an empty file to be used by `alternatives`
|
|
|
|
|
touch %{buildroot}%{_bindir}/%{pypi_name}-3
|
|
|
|
|
|
|
|
|
|
%if %{without bootstrap}
|
|
|
|
|
# We can only use bdist_wheel when wheel is installed, hence we don't build the wheel in %%build
|
|
|
|
@ -107,6 +118,20 @@ rm setup.cfg # to drop pytest coverage options configured there
|
|
|
|
|
%pytest -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 --keep-foreign --remove-slave python3 %{_bindir}/python%{python3_version} \
|
|
|
|
|
%{pypi_name}-3
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python%{python3_pkgversion}-%{pypi_name}
|
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
%doc README.rst
|
|
|
|
@ -115,6 +140,7 @@ rm setup.cfg # to drop pytest coverage options configured there
|
|
|
|
|
%{_bindir}/%{pypi_name}
|
|
|
|
|
%{_bindir}/%{pypi_name}-3
|
|
|
|
|
%endif
|
|
|
|
|
%ghost %{_bindir}/%{pypi_name}-3
|
|
|
|
|
%{python3_sitelib}/%{pypi_name}*/
|
|
|
|
|
|
|
|
|
|
%if %{without bootstrap}
|
|
|
|
@ -126,6 +152,10 @@ rm setup.cfg # to drop pytest coverage options configured there
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Fri Apr 21 2023 Lumír Balhar <lbalhar@redhat.com> - 0.38.4-4
|
|
|
|
|
- Fix alternatives scriptlets
|
|
|
|
|
Resolves: RHEL-372
|
|
|
|
|
|
|
|
|
|
* Wed Feb 01 2023 Charalampos Stratakis <cstratak@redhat.com> - 0.38.4-3
|
|
|
|
|
- Explicitly require the python3.11-rpm-macros
|
|
|
|
|
|
|
|
|
|