Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83be6a10d1 |
2 changed files with 16 additions and 8 deletions
|
|
@ -1,6 +1,6 @@
|
|||
--- /usr/bin/pip3 2018-03-29 15:22:13.000000000 +0200
|
||||
+++ pip3 2018-05-04 11:49:08.098821010 +0200
|
||||
@@ -4,7 +4,12 @@
|
||||
@@ -4,7 +4,16 @@
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
|
@ -11,6 +11,10 @@
|
|||
+ # user has most probably downgraded pip in their home
|
||||
+ # so let them run it anyway until ~/.local/bin makes it in front of the PATH
|
||||
+ from pip import main
|
||||
+else:
|
||||
+ # user might also upgraded pip...
|
||||
+ if hasattr(main, 'main'):
|
||||
+ main = main.main
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
||||
|
|
@ -23,7 +23,7 @@ Name: python-%{srcname}
|
|||
# When updating, update the bundled libraries versions bellow!
|
||||
# You can use vendor_meta.sh in the dist git repo
|
||||
Version: 18.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: A tool for installing and managing Python packages
|
||||
|
||||
# We bundle a lot of libraries with pip, which itself is under MIT license.
|
||||
|
|
@ -97,21 +97,22 @@ Patch3: remove-existing-dist-only-if-path-conflicts.patch
|
|||
|
||||
# Downstream only patch
|
||||
# Users might have local installations of pip from using
|
||||
# `pip install --user --upgrade pip` on older versions.
|
||||
# `pip install --user --upgrade pip` on older/newer versions.
|
||||
# If they do that and they run `pip` or `pip3`, the one from /usr/bin is used.
|
||||
# However that's the one from this RPM package (pip10+) and the import in there
|
||||
# fails (it tries to import from ~/.local, but older pip is there with a bit
|
||||
# different API).
|
||||
# However that's the one from this RPM package and the import in there might
|
||||
# fail (it tries to import from ~/.local, but older or newer pip is there with
|
||||
# a bit different API).
|
||||
# We add this patch as a dirty workaround to make /usr/bin/pip* work with
|
||||
# both pip10+ (from this RPM) and older pip (from whatever).
|
||||
# both pip10+ (from this RPM) and older or newer (19.3+) pip (from whatever).
|
||||
# A proper fix is to put ~/.local/bin in front of /usr/bin in the PATH,
|
||||
# however others are against that and we cannot change it for existing
|
||||
# installs/user homes anyway.
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1569488
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1571650
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1767212
|
||||
# WARNING: /usr/bin/pip* are entrypoints, this cannot be applied in %%prep!
|
||||
# %%patch10 doesn't work outside of %%prep, so we add it as a source
|
||||
Source10: pip-allow-older-versions.patch
|
||||
Source10: pip-allow-different-versions.patch
|
||||
|
||||
%description
|
||||
pip is a package management system used to install and manage software packages
|
||||
|
|
@ -464,6 +465,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Nov 11 2019 Miro Hrončok <mhroncok@redhat.com> - 18.1-2
|
||||
- Make /usr/bin/pip(2|3) work with user-installed pip 19.3+ (#1767212)
|
||||
|
||||
* Thu Nov 22 2018 Miro Hrončok <mhroncok@redhat.com> - 18.1-1
|
||||
- Update to 18.1 (#1652089)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue