import CS python3.12-pip-23.2.1-4.el9
This commit is contained in:
parent
0c6bdcc82e
commit
66dc6eee00
|
@ -1,2 +1 @@
|
|||
SOURCES/pip-23.2.1-man.tar.gz
|
||||
SOURCES/pip-23.2.1.tar.gz
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
e78411dc8b3a57af0c84b2b9a13365d2a87ffc36 SOURCES/pip-23.2.1-man.tar.gz
|
||||
f90fd7e09cdb6f87b7498942fd41157363868a3f SOURCES/pip-23.2.1.tar.gz
|
||||
|
|
|
@ -50,15 +50,6 @@ License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.
|
|||
URL: https://pip.pypa.io/
|
||||
Source0: https://github.com/pypa/pip/archive/%{upstream_version}/%{srcname}-%{upstream_version}.tar.gz
|
||||
|
||||
# To generate the man pages for RHEL8 on a system with Python >= 3.7
|
||||
# rhpkg prep
|
||||
# cd into the pip folder
|
||||
# sed -i '/myst_parser/d;/sphinx_copybutton/d;/sphinx_inline_tabs/d;/sphinxcontrib.towncrier/d' docs/html/conf.py
|
||||
# sphinx-build-3 -b man docs/man docs/build/man -c docs/html
|
||||
# tar -czf pip-23.2.1-man.tar.gz --exclude=".[^/]*" -v docs/build/man
|
||||
# mv pip-23.2.1-man.tar.gz ..
|
||||
Source1: pip-%{base_version}-man.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
# Prevent removing of the system packages installed under /usr/lib
|
||||
|
@ -161,14 +152,6 @@ BuildRequires: python%{python3_pkgversion}-installer
|
|||
# Side note: pip bundles pkg_resources from setuptools for internal usage.
|
||||
Recommends: python%{python3_pkgversion}-setuptools
|
||||
|
||||
# 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}
|
||||
|
||||
# Virtual provides for the packages bundled by pip:
|
||||
%{bundled %{python3_pkgversion}}
|
||||
|
||||
|
@ -211,6 +194,10 @@ sed -i '/\.exe/d' setup.py
|
|||
%build
|
||||
%py3_build_wheel
|
||||
|
||||
export PYTHONPATH=./src/
|
||||
sphinx-build-3 -b man docs/man docs/build/man -c docs/html
|
||||
|
||||
|
||||
%install
|
||||
# The following is similar to %%pyproject_install, but we don't have
|
||||
# /usr/bin/pip yet, so we install using the wheel directly.
|
||||
|
@ -230,7 +217,6 @@ sed -i '/\.exe/d' setup.py
|
|||
'pip==%{upstream_version}'
|
||||
|
||||
# Install the man pages
|
||||
tar -xvf %{SOURCE1}
|
||||
pushd docs/build/man
|
||||
install -d %{buildroot}%{_mandir}/man1
|
||||
for MAN in *1; do
|
||||
|
@ -266,11 +252,6 @@ install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir}
|
|||
rm %{buildroot}%{_bindir}/pip
|
||||
rm %{buildroot}%{_bindir}/pip3
|
||||
|
||||
# All ghost files controlled by alternatives need to exist for the files
|
||||
# section check to succeed
|
||||
touch %{buildroot}%{_bindir}/pip3
|
||||
touch %{buildroot}%{_bindir}/pip-3
|
||||
|
||||
%check
|
||||
%if 0%{?rhel} >= 9
|
||||
# The test cannot run on RHEL8 due to the test script missing from RPM.
|
||||
|
@ -293,34 +274,6 @@ pytest_k='not completion'
|
|||
%endif
|
||||
|
||||
|
||||
%post -n python%{python3_pkgversion}-%{srcname}
|
||||
alternatives --keep-foreign --add-slave python3 %{_bindir}/python%{python3_version} \
|
||||
%{_bindir}/pip3 \
|
||||
pip3 \
|
||||
%{_bindir}/pip%{python3_version}
|
||||
alternatives --keep-foreign --add-slave python3 %{_bindir}/python%{python3_version} \
|
||||
%{_bindir}/pip-3 \
|
||||
pip-3 \
|
||||
%{_bindir}/pip-%{python3_version}
|
||||
|
||||
%postun -n python%{python3_pkgversion}-%{srcname}
|
||||
# Do this only during uninstall process (not during update)
|
||||
if [ $1 -eq 0 ]; then
|
||||
# Only remove the slave links if the master link for python3 still exists.
|
||||
# Due to a possible bug in yum, python3.12 gets removed before python3.12-pip
|
||||
# even though we have declared Requires(postun): python3.12
|
||||
EXISTS=`alternatives --display python3 | \
|
||||
grep -c "^/usr/bin/python%{python3_version} - priority [0-9]*"`
|
||||
|
||||
if [ $EXISTS -ne 0 ]; then
|
||||
alternatives --keep-foreign --remove-slave python3 %{_bindir}/python%{python3_version} \
|
||||
pip3
|
||||
alternatives --keep-foreign --remove-slave python3 %{_bindir}/python%{python3_version} \
|
||||
pip-3
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
%files -n python%{python3_pkgversion}-%{srcname}
|
||||
%doc README.rst
|
||||
%license %{python3_sitelib}/pip-%{upstream_version}.dist-info/LICENSE.txt
|
||||
|
@ -333,8 +286,6 @@ fi
|
|||
%{python3_sitelib}/pip*
|
||||
%dir %{bashcompdir}
|
||||
%{bashcompdir}/pip%{python3_pkgversion}
|
||||
%ghost %{_bindir}/pip3
|
||||
%ghost %{_bindir}/pip-3
|
||||
|
||||
%files -n %{python_wheel_pkg_prefix}-%{srcname}-wheel
|
||||
%license LICENSE.txt
|
||||
|
|
Loading…
Reference in New Issue