Compare commits

...

1 Commits

Author SHA1 Message Date
eabdullin 4be30a957b import CS python3.12-wheel-0.41.2-3.el9 2024-04-01 08:21:04 +00:00
1 changed files with 0 additions and 30 deletions

View File

@ -1,11 +1,6 @@
%global __python3 /usr/bin/python3.12 %global __python3 /usr/bin/python3.12
%global python3_pkgversion 3.12 %global python3_pkgversion 3.12
# Workaround for https://issues.redhat.com/browse/CS-1907
# By defining the %%{__bootstrap} value,
# we prevent misconfigured Koji putting a literal %%{__bootstrap} in %%dist.
%{!?__bootstrap:%global __bootstrap %{nil}}
# The function of bootstrap is that it installs the wheel by unzipping it # The function of bootstrap is that it installs the wheel by unzipping it
%bcond_with bootstrap %bcond_with bootstrap
# Default: when bootstrapping -> disable tests # Default: when bootstrapping -> disable tests
@ -68,14 +63,6 @@ Provides: bundled(python%{python3_version}dist(packaging)) = 23
%{bundled} %{bundled}
# Require alternatives version that implements the --keep-foreign flag and fixes rhbz#2203820
Requires(postun): alternatives >= 1.19.2-1
# python3.12 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: %global _description %{expand:
Wheel is the reference implementation of the Python wheel packaging standard, Wheel is the reference implementation of the Python wheel packaging standard,
as defined in PEP 427. as defined in PEP 427.
@ -124,8 +111,6 @@ mv %{buildroot}%{_bindir}/%{pypi_name}{,-%{python3_version}}
ln -s %{pypi_name}-%{python3_version} %{buildroot}%{_bindir}/%{pypi_name}-3 ln -s %{pypi_name}-%{python3_version} %{buildroot}%{_bindir}/%{pypi_name}-3
ln -s %{pypi_name}-3 %{buildroot}%{_bindir}/%{pypi_name} ln -s %{pypi_name}-3 %{buildroot}%{_bindir}/%{pypi_name}
%endif %endif
# Create an empty file to be used by `alternatives`
touch %{buildroot}%{_bindir}/%{pypi_name}-3
mkdir -p %{buildroot}%{python_wheel_dir} mkdir -p %{buildroot}%{python_wheel_dir}
install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir}
@ -140,20 +125,6 @@ install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir}
%pytest -v --ignore build %pytest -v --ignore build
%endif %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} %files -n python%{python3_pkgversion}-%{pypi_name}
%license LICENSE.txt %license LICENSE.txt
%doc README.rst %doc README.rst
@ -162,7 +133,6 @@ fi
%{_bindir}/%{pypi_name} %{_bindir}/%{pypi_name}
%{_bindir}/%{pypi_name}-3 %{_bindir}/%{pypi_name}-3
%endif %endif
%ghost %{_bindir}/%{pypi_name}-3
%{python3_sitelib}/%{pypi_name}*/ %{python3_sitelib}/%{pypi_name}*/
%files -n %{python_wheel_pkg_prefix}-%{pypi_name}-wheel %files -n %{python_wheel_pkg_prefix}-%{pypi_name}-wheel