diff --git a/pip-20.2.2.tar.gz b/pip-20.2.2.tar.gz deleted file mode 100644 index df4b2c067082ea8c629cf6c7105e5b98a1349894..0000000000000000000000000000000000000000 Binary files a/pip-20.2.2.tar.gz and /dev/null differ diff --git a/pip-20.3.3.tar.gz b/pip-20.3.3.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..eb286c6709419eb7ab4622cc571c14d7fffd4854 Binary files /dev/null and b/pip-20.3.3.tar.gz differ diff --git a/python-pip.spec b/python-pip.spec index 3d035b59a33f24b5c58f6925acf4d9cb6a79f840..22bb781d9fc7323ba9c3a2a01cf7d7faae29dd50 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -5,12 +5,12 @@ pip is the package installer for Python. You can use pip to install packages from the Python Package Index and other indexes. %global bashcompdir %(b=$(pkg-config --variable=completionsdir bash-completion 2>/dev/null); echo ${b:-%{_sysconfdir}/bash_completion.d}) Name: python-%{srcname} -Version: 20.2.2 -Release: 3 +Version: 20.3.3 +Release: 1 Summary: A tool for installing and managing Python packages License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD) URL: http://www.pip-installer.org -Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +Source0: %{pypi_source} BuildArch: noarch Patch1: allow-stripping-given-prefix-from-wheel-RECORD-files.patch Patch2: emit-a-warning-when-running-with-root-privileges.patch @@ -84,9 +84,10 @@ sed -i -e "s/^\\(complete.*\\) pip\$/\\1 pip pip{,-}{3,%{python3_version}}/" \ ln -s ./pip%{python3_version} %{buildroot}%{_bindir}/pip-%{python3_version} ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 -# Make sure the INSTALLER is not pip, otherwise Patch2 won't work +# Make sure the INSTALLER is not pip and remove RECORD, otherwise Patch2 won't work # %%pyproject macros do this for all packages -echo rpm > %{buildroot}%{python3_sitelib}/pip-20.2.2.dist-info/INSTALLER +echo rpm > %{buildroot}%{python3_sitelib}/pip-%{version}.dist-info/INSTALLER +rm %{buildroot}%{python3_sitelib}/pip-%{version}.dist-info/RECORD mkdir -p %{buildroot}%{python_wheeldir} install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} @@ -112,6 +113,9 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} %{python_wheeldir}/%{python_wheelname} %changelog +* Tue Feb 02 2021 shixuantong - 20.3.3-1 +- upgrade version to 20.3.3 + * Wed Nov 4 2020 wangjie -20.2.2-3 - Type:NA - ID:NA diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 99171ecaa935c6ee1cb11451e139d3f20f6ab55b..8a09f051e181c7eaf9a52868f6aac259f34f72ca 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,24 +1,26 @@ -From d381c59fdc15949c4dc293bd92bbccb60289a703 Mon Sep 17 00:00:00 2001 +From 854fd7296bb9306d46ba3cc8bb7c6f18a7960ed6 Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Sun, 26 Apr 2020 21:19:03 +0200 Subject: [PATCH] Prevent removing of the system packages installed under /usr/lib - + when pip install -U is executed. - + Resolves: rhbz#1550368 - + +Co-Authored-By: Michal Cyprian +Co-Authored-By: Victor Stinner --- - src/pip/_internal/req/req_install.py | 3 ++- - src/pip/_internal/resolution/legacy/resolver.py | 5 ++++- - src/pip/_internal/utils/misc.py | 9 +++++++++ - 3 files changed, 15 insertions(+), 2 deletions(-) - + src/pip/_internal/req/req_install.py | 3 ++- + src/pip/_internal/resolution/legacy/resolver.py | 5 ++++- + src/pip/_internal/utils/misc.py | 11 +++++++++++ + 3 files changed, 17 insertions(+), 2 deletions(-) + diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py index 4759f4a..2e76e35 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -39,6 +39,7 @@ from pip._internal.utils.misc import ( +@@ -41,6 +41,7 @@ from pip._internal.utils.misc import ( ask_path_exists, backup_dir, display_path, @@ -26,7 +28,7 @@ index 4759f4a..2e76e35 100644 dist_in_site_packages, dist_in_usersite, get_distribution, -@@ -446,7 +447,7 @@ class InstallRequirement(object): +@@ -447,7 +448,7 @@ class InstallRequirement(object): "lack sys.path precedence to {} in {}".format( existing_dist.project_name, existing_dist.location) ) @@ -36,7 +38,7 @@ index 4759f4a..2e76e35 100644 else: if self.editable: diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py -index c9b4c66..8b98ebd 100644 +index c9b4c66..ff361d8 100644 --- a/src/pip/_internal/resolution/legacy/resolver.py +++ b/src/pip/_internal/resolution/legacy/resolver.py @@ -34,6 +34,7 @@ from pip._internal.resolution.base import BaseResolver @@ -44,36 +46,37 @@ index c9b4c66..8b98ebd 100644 from pip._internal.utils.logging import indent_log from pip._internal.utils.misc import dist_in_usersite, normalize_version_info +from pip._internal.utils.misc import dist_in_install_path - from pip._internal.utils.packaging import ( - check_requires_python, - get_requires_python, -@@ -207,7 +208,9 @@ class Resolver(BaseResolver): + from pip._internal.utils.packaging import check_requires_python, get_requires_python + from pip._internal.utils.typing import MYPY_CHECK_RUNNING + +@@ -204,7 +205,9 @@ class Resolver(BaseResolver): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. - if not self.use_user_site or dist_in_usersite(req.satisfied_by): + if ((not self.use_user_site -+ or dist_in_usersite(req.satisfied_by)) -+ and dist_in_install_path(req.satisfied_by)): ++ or dist_in_usersite(req.satisfied_by)) ++ and dist_in_install_path(req.satisfied_by)): req.should_reinstall = True req.satisfied_by = None diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py -index 5629c60..6bd6daa 100644 +index 24a7455..5fd48d3 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py -@@ -31,6 +31,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote +@@ -31,7 +31,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote + from pip import __version__ from pip._internal.exceptions import CommandError - from pip._internal.locations import ( -+ distutils_scheme, - get_major_minor_version, - site_packages, - user_site, -@@ -402,6 +403,14 @@ def dist_in_site_packages(dist): - """ +-from pip._internal.locations import get_major_minor_version, site_packages, user_site ++from pip._internal.locations import distutils_scheme, get_major_minor_version, site_packages, user_site + from pip._internal.utils.compat import WINDOWS, expanduser, stdlib_pkgs, str_to_display + from pip._internal.utils.typing import MYPY_CHECK_RUNNING, cast + from pip._internal.utils.virtualenv import ( +@@ -406,6 +406,16 @@ def dist_in_site_packages(dist): return dist_location(dist).startswith(normalize_path(site_packages)) + +def dist_in_install_path(dist): + """ + Return True if given Distribution is installed in @@ -82,9 +85,10 @@ index 5629c60..6bd6daa 100644 + norm_path = normalize_path(dist_location(dist)) + return norm_path.startswith(normalize_path( + distutils_scheme("")['purelib'].split('python')[0])) - ++ ++ def dist_is_editable(dist): # type: (Distribution) -> bool + """ -- -2.23.0 - +2.25.4 \ No newline at end of file