import python-pip-9.0.3-19.el8

This commit is contained in:
CentOS Sources 2021-05-18 02:53:23 -04:00 committed by Andrew Lukoshko
parent 26ba5aef18
commit 7ba5d2a0e0

View File

@ -9,17 +9,12 @@
%global python3_wheeldir %{_datadir}/python3-wheels %global python3_wheeldir %{_datadir}/python3-wheels
%endif %endif
# Note that with disabled python3, bashcomp2 will be disabled as well because
# bashcompdir will point to a different path than with python3 enabled.
%global bashcompdir %(b=$(pkg-config --variable=completionsdir bash-completion 2>/dev/null); echo ${b:-%{_sysconfdir}/bash_completion.d}) %global bashcompdir %(b=$(pkg-config --variable=completionsdir bash-completion 2>/dev/null); echo ${b:-%{_sysconfdir}/bash_completion.d})
%if "%{bashcompdir}" != "%{_sysconfdir}/bash_completion.d"
%global bashcomp2 1
%endif
Name: python-%{srcname} Name: python-%{srcname}
# When updating, update the bundled libraries versions bellow! # When updating, update the bundled libraries versions bellow!
Version: 9.0.3 Version: 9.0.3
Release: 18%{?dist} Release: 19%{?dist}
Summary: A tool for installing and managing Python packages Summary: A tool for installing and managing Python packages
Group: Development/Libraries Group: Development/Libraries
@ -308,20 +303,8 @@ mkdir -p %{buildroot}%{bashcompdir}
PYTHONPATH=%{buildroot}%{python3_sitelib} \ PYTHONPATH=%{buildroot}%{python3_sitelib} \
%{buildroot}%{_bindir}/pip3 completion --bash \ %{buildroot}%{_bindir}/pip3 completion --bash \
> %{buildroot}%{bashcompdir}/pip3 > %{buildroot}%{bashcompdir}/pip3
pips2=pip
pips3=pip3 sed -i -e "s/^\\(complete.*\\) pip\$/\\1 pip3 pip-3 pip3.6 pip-3.6/" \
for pip in %{buildroot}%{_bindir}/pip*; do
pip=$(basename $pip)
case $pip in
pip3?*)
pips3="$pips3 $pip"
%if 0%{?bashcomp2}
ln -s pip-%{python3_version} %{buildroot}%{bashcompdir}/$pip
%endif
;;
esac
done
sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips3/" \
-e s/_pip_completion/_pip3_completion/ \ -e s/_pip_completion/_pip3_completion/ \
%{buildroot}%{bashcompdir}/pip3 %{buildroot}%{bashcompdir}/pip3
@ -363,10 +346,7 @@ py.test-%{python3_version} -m 'not network'
%{_bindir}/pip%{python3_version} %{_bindir}/pip%{python3_version}
%{_bindir}/pip-%{python3_version} %{_bindir}/pip-%{python3_version}
%dir %{bashcompdir} %dir %{bashcompdir}
%{bashcompdir}/pip3* %{bashcompdir}/pip*
%if 0%{?bashcomp2}
%dir %(dirname %{bashcompdir})
%endif
%if %{with doc} %if %{with doc}
%files doc %files doc
@ -384,6 +364,10 @@ py.test-%{python3_version} -m 'not network'
%endif %endif
%changelog %changelog
* Fri Jan 08 2021 Lumír Balhar <lbalhar@redhat.com> - 9.0.3-19
- Fix bash completion files and simplify spec
Resolves: rhbz#1904478
* Wed Aug 19 2020 Tomas Orsava <torsava@redhat.com> - 9.0.3-18 * Wed Aug 19 2020 Tomas Orsava <torsava@redhat.com> - 9.0.3-18
- Patch for pip install <url> allow directory traversal, leading to arbitrary file write - Patch for pip install <url> allow directory traversal, leading to arbitrary file write
Resolves: rhbz#1868016 Resolves: rhbz#1868016