diff --git a/python-pip.spec b/python-pip.spec index ff1412f..e899c46 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -406,6 +406,7 @@ pytest_k='not completion and * Wed Oct 13 2021 Miro HronĨok - 21.3-1 - Update to 21.3 - Resolves: rhbz#2013026 +- Fix incomplete pip-updates in virtual environments * Wed Oct 06 2021 Charalampos Stratakis - 21.2.3-4 - Remove bundled windows executables diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index f04257c..7ff95e5 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -71,10 +71,11 @@ diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_inter index 766dc26..c8c1cd8 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py -@@ -1,6 +1,7 @@ +@@ -1,6 +1,8 @@ import contextlib import functools import logging ++import sys +import sysconfig from typing import ( TYPE_CHECKING, @@ -102,8 +103,8 @@ index 766dc26..c8c1cd8 100644 + # Prevent uninstalling packages from /usr + try: + if dist_location(dist._dist) in ( -+ sysconfig.get_path('purelib', scheme='rpm_prefix'), -+ sysconfig.get_path('platlib', scheme='rpm_prefix'), ++ sysconfig.get_path('purelib', scheme='rpm_prefix', vars={'base': sys.base_prefix}), ++ sysconfig.get_path('platlib', scheme='rpm_prefix', vars={'base': sys.base_prefix}), + ): + return None + except KeyError: # this Python doesn't have 'rpm_prefix' scheme yet