upgrade version to 20.3.3

This commit is contained in:
sxt1001 2021-02-02 15:05:27 +08:00
parent e42b692b8e
commit 3f892edc98
4 changed files with 43 additions and 35 deletions

Binary file not shown.

BIN
pip-20.3.3.tar.gz Normal file

Binary file not shown.

View File

@ -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<shixuantong@huawei.com> - 20.3.3-1
- upgrade version to 20.3.3
* Wed Nov 4 2020 wangjie<wangjie294@huawei.com> -20.2.2-3
- Type:NA
- ID:NA

View File

@ -1,4 +1,4 @@
From d381c59fdc15949c4dc293bd92bbccb60289a703 Mon Sep 17 00:00:00 2001
From 854fd7296bb9306d46ba3cc8bb7c6f18a7960ed6 Mon Sep 17 00:00:00 2001
From: Tomas Hrnciar <thrnciar@redhat.com>
Date: Sun, 26 Apr 2020 21:19:03 +0200
Subject: [PATCH] Prevent removing of the system packages installed under
@ -8,17 +8,19 @@ when pip install -U is executed.
Resolves: rhbz#1550368
Co-Authored-By: Michal Cyprian <m.cyprian@gmail.com>
Co-Authored-By: Victor Stinner <vstinner@redhat.com>
---
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/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,10 +46,10 @@ 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.
@ -59,21 +61,22 @@ index c9b4c66..8b98ebd 100644
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