|
|
|
@ -1,6 +1,11 @@
|
|
|
|
|
%global __python3 /usr/bin/python3.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
|
|
|
|
|
%bcond_with bootstrap
|
|
|
|
|
# Default: when bootstrapping -> disable tests
|
|
|
|
@ -63,6 +68,14 @@ Provides: bundled(python%{python3_version}dist(packaging)) = 23
|
|
|
|
|
|
|
|
|
|
%{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:
|
|
|
|
|
Wheel is the reference implementation of the Python wheel packaging standard,
|
|
|
|
|
as defined in PEP 427.
|
|
|
|
@ -111,6 +124,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
|
|
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{python_wheel_dir}
|
|
|
|
|
install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir}
|
|
|
|
@ -125,6 +140,20 @@ install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir}
|
|
|
|
|
%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
|
|
|
|
@ -133,6 +162,7 @@ install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir}
|
|
|
|
|
%{_bindir}/%{pypi_name}
|
|
|
|
|
%{_bindir}/%{pypi_name}-3
|
|
|
|
|
%endif
|
|
|
|
|
%ghost %{_bindir}/%{pypi_name}-3
|
|
|
|
|
%{python3_sitelib}/%{pypi_name}*/
|
|
|
|
|
|
|
|
|
|
%files -n %{python_wheel_pkg_prefix}-%{pypi_name}-wheel
|
|
|
|
@ -142,6 +172,9 @@ install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir}
|
|
|
|
|
%{python_wheel_dir}/%{python_wheel_name}
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Fri Mar 29 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 0.41.2-3
|
|
|
|
|
- Rebuilt for MSVSphere 8.10 beta
|
|
|
|
|
|
|
|
|
|
* Tue Jan 23 2024 Miro Hrončok <mhroncok@redhat.com> - 0.41.2-3
|
|
|
|
|
- Rebuilt for timestamp .pyc invalidation mode
|
|
|
|
|
|
|
|
|
|