Fix incomplete pip-updates in virtual environments
This commit is contained in:
parent
20ae7fd440
commit
5e3e97d02b
@ -406,6 +406,7 @@ pytest_k='not completion and
|
||||
* Wed Oct 13 2021 Miro Hrončok <mhroncok@redhat.com> - 21.3-1
|
||||
- Update to 21.3
|
||||
- Resolves: rhbz#2013026
|
||||
- Fix incomplete pip-updates in virtual environments
|
||||
|
||||
* Wed Oct 06 2021 Charalampos Stratakis <cstratak@redhat.com> - 21.2.3-4
|
||||
- Remove bundled windows executables
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user