You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
875 B
25 lines
875 B
diff --git a/virtualenv.py b/virtualenv.py
|
|
index 8f05739..cd10e9f 100755
|
|
--- a/virtualenv.py
|
|
+++ b/virtualenv.py
|
|
@@ -476,7 +476,18 @@ def virtualenv_support_dirs():
|
|
|
|
# normal filesystem installation
|
|
if os.path.isdir(join(HERE, "virtualenv_support")):
|
|
- yield [join(HERE, "virtualenv_support")]
|
|
+ dirs = [join(HERE, "virtualenv_support")]
|
|
+ if os.path.isdir("/usr/share/python-wheels"):
|
|
+ dirs.insert(0, "/usr/share/python-wheels")
|
|
+ try:
|
|
+ import ensurepip
|
|
+ ensurepip_path = os.path.join(ensurepip.__path__[0], "_bundled")
|
|
+ except (ImportError, AttributeError, IndexError):
|
|
+ pass
|
|
+ else:
|
|
+ if os.path.isdir(ensurepip_path):
|
|
+ dirs.insert(0, ensurepip_path)
|
|
+ yield dirs
|
|
elif IS_ZIPAPP:
|
|
tmpdir = tempfile.mkdtemp()
|
|
try:
|