From d89553048495b1c679155442480aa4399891d5b9 Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Sun, 29 Nov 2020 04:58:55 +0800 Subject: [PATCH 1/2] [patch tracking] 20201129045849754147 - https://github.com/pypa/pip/commit/b6ca7439a6e1ad80ed8c30e203f5e0ae989cfefb --- ...7439a6e1ad80ed8c30e203f5e0ae989cfefb.patch | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 b6ca7439a6e1ad80ed8c30e203f5e0ae989cfefb.patch diff --git a/b6ca7439a6e1ad80ed8c30e203f5e0ae989cfefb.patch b/b6ca7439a6e1ad80ed8c30e203f5e0ae989cfefb.patch new file mode 100644 index 0000000..deba5a6 --- /dev/null +++ b/b6ca7439a6e1ad80ed8c30e203f5e0ae989cfefb.patch @@ -0,0 +1,63 @@ +diff --git a/news/9169.bugfix.rst b/news/9169.bugfix.rst +new file mode 100644 +index 0000000000..299ec27336 +--- /dev/null ++++ b/news/9169.bugfix.rst +@@ -0,0 +1,2 @@ ++New Resolver: editable installations are done, regardless of whether ++the already-installed distribution is editable. +diff --git a/src/pip/_internal/resolution/resolvelib/resolver.py b/src/pip/_internal/resolution/resolvelib/resolver.py +index 9053c871d8..30b860f6c4 100644 +--- a/src/pip/_internal/resolution/resolvelib/resolver.py ++++ b/src/pip/_internal/resolution/resolvelib/resolver.py +@@ -134,25 +134,24 @@ def resolve(self, root_reqs, check_supported_wheels): + + # Check if there is already an installation under the same name, + # and set a flag for later stages to uninstall it, if needed. +- # +- # * There is no existing installation. Nothing to uninstall. +- # * The --force-reinstall flag is set. Always reinstall. +- # * The installation is different in version or editable-ness, so +- # we need to uninstall it to install the new distribution. +- # * The candidate is a local wheel. Do nothing. +- # * The candidate is a local sdist. Print a deprecation warning. +- # * The candidate is a local path. Always reinstall. + installed_dist = self.factory.get_dist_to_uninstall(candidate) + if installed_dist is None: ++ # There is no existing installation -- nothing to uninstall. + ireq.should_reinstall = False + elif self.factory.force_reinstall: ++ # The --force-reinstall flag is set -- reinstall. + ireq.should_reinstall = True + elif installed_dist.parsed_version != candidate.version: ++ # The installation is different in version -- reinstall. + ireq.should_reinstall = True +- elif dist_is_editable(installed_dist) != candidate.is_editable: ++ elif candidate.is_editable or dist_is_editable(installed_dist): ++ # The incoming distribution is editable, or different in ++ # editable-ness to installation -- reinstall. + ireq.should_reinstall = True + elif candidate.source_link.is_file: ++ # The incoming distribution is under file:// + if candidate.source_link.is_wheel: ++ # is a local wheel -- do nothing. + logger.info( + "%s is already installed with the same version as the " + "provided wheel. Use --force-reinstall to force an " +@@ -166,6 +165,7 @@ def resolve(self, root_reqs, check_supported_wheels): + and candidate.source_link.ext != ".zip" + ) + if looks_like_sdist: ++ # is a local sdist -- show a deprecation warning! + reason = ( + "Source distribution is being reinstalled despite an " + "installed package having the same name and version as " +@@ -178,6 +178,8 @@ def resolve(self, root_reqs, check_supported_wheels): + gone_in="21.1", + issue=8711, + ) ++ ++ # is a local sdist or path -- reinstall + ireq.should_reinstall = True + else: + continue -- Gitee From 15cf60b1f93cb387e87ca3d46a6543aab6e1551f Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Sun, 29 Nov 2020 04:58:55 +0800 Subject: [PATCH 2/2] [patch tracking] 20201129045849754147 - update spec file --- python-pip.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 3d035b5..06ddca7 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ pip is the package installer for Python. You can use pip to install packages fro %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 +Release: 4 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 @@ -16,6 +16,7 @@ Patch1: allow-stripping-given-prefix-from-wheel-RECORD-files.patch Patch2: emit-a-warning-when-running-with-root-privileges.patch Patch3: remove-existing-dist-only-if-path-conflicts.patch Patch6000: dummy-certifi.patch +Patch6001: b6ca7439a6e1ad80ed8c30e203f5e0ae989cfefb.patch Source10: pip-allow-older-versions.patch %description %{_description} @@ -112,6 +113,9 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} %{python_wheeldir}/%{python_wheelname} %changelog +* 20201129045849754147 patch-tracking 20.2.2-4 +- append patch file of upstream repository from to + * Wed Nov 4 2020 wangjie -20.2.2-3 - Type:NA - ID:NA @@ -161,4 +165,4 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} - DESC: Synchronize a patch * Mon Sep 23 2019 openEuler Buildteam - 18.0-6 -- Package init +- Package init \ No newline at end of file -- Gitee