summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/changes.rst19
-rwxr-xr-xvirtualenv.py46
-rw-r--r--virtualenv_support/setuptools-50.3.2-py3-none-any.whlbin0 -> 785194 bytes
3 files changed, 41 insertions, 24 deletions
diff --git a/docs/changes.rst b/docs/changes.rst
index e920e50..7a67ef1 100644
--- a/docs/changes.rst
+++ b/docs/changes.rst
@@ -5,19 +5,24 @@ Release History
.. towncrier release notes start
-v16.7.11 (2021-07-20)
+v16.7.12 (2020-07-22)
+---------------------
+
Bugfixes
^^^^^^^^
-- Preserve compatibility with Python 3.10 - by ``hroncok`` (`#2109 <https://github.com/pypa/virtualenv/issues/2109>`_)
-- Bump embedded pip/setuptools/wheel - by :user:`gaborbernat`. (`#2151 <https://github.com/pypa/virtualenv/issues/2151>`_)
+- Fix Python 2.7, 3.4 and 3.5 failing - by ``gaborbernat``
-Miscellaneous
-^^^^^^^^^^^^^
+v16.7.11 (2020-07-20)
+---------------------
-- Don't attempt to use setuptools 44+ with Python 3.4 - by ``hroncok`` (`#1677 <https://github.com/pypa/virtualenv/issues/1677>`_)
+Bugfixes
+^^^^^^^^
+- Don't attempt to use setuptools 44+ with Python 3.4 - by ``hroncok`` (`#1677 <https://github.com/pypa/virtualenv/issues/1677>`_)
+- Preserve compatibility with Python 3.10 - by ``hroncok`` (`#2109 <https://github.com/pypa/virtualenv/issues/2109>`_)
+- Bump embedded pip/setuptools/wheel - by ``gaborbernat`` (`#2151 <https://github.com/pypa/virtualenv/issues/2151>`_)
v16.7.10 (2020-02-24)
---------------------
@@ -25,7 +30,7 @@ v16.7.10 (2020-02-24)
Bugfixes
^^^^^^^^
-- fix error printing in bailout for Python < 2.7 - by ``AdamWill` and ``hroncok`` (`#1651 <https://github.com/pypa/virtualenv/issues/1651>`_)
+- fix error printing in bailout for Python < 2.7 - by ``AdamWill`` and ``hroncok`` (`#1651 <https://github.com/pypa/virtualenv/issues/1651>`_)
v16.7.9 (2019-12-15)
diff --git a/virtualenv.py b/virtualenv.py
index 0f4c3de..b4374e5 100755
--- a/virtualenv.py
+++ b/virtualenv.py
@@ -971,6 +971,23 @@ def filter_install_output(line):
return Logger.DEBUG
+MAX_VER = {
+ "pip": {
+ (2, 7): (20, 3, 4),
+ (3, 4): (19, 1, 1),
+ (3, 5): (20, 3, 4),
+ },
+ "setuptools": {
+ (2, 7): (44, 1, 1),
+ (3, 4): (43, 0, 0),
+ (3, 5): (50, 3, 2),
+ },
+ "wheel": {
+ (3, 4): (0, 33, 6),
+ },
+}
+
+
def find_wheels(projects, search_dirs):
"""Find wheels from which we can import PROJECTS.
@@ -996,14 +1013,9 @@ def find_wheels(projects, search_dirs):
)
)
)
- if project == "pip" and sys.version_info[0:2] == (3, 4):
- wheel = next(p for v, p in versions if v <= (19, 1, 1))
- elif project == "pip" and sys.version_info[0:2] == (3, 5):
- wheel = next(p for v, p in versions if v <= (20, 3, 4))
- elif project == "setuptools" and sys.version_info[0:2] == (3, 4):
- wheel = next(p for v, p in versions if v < (44,))
- elif project == "setuptools" and sys.version_info[0:2] == (3, 5):
- wheel = next(p for v, p in versions if v < (51,))
+ max_ver = MAX_VER.get(project, {}).get(sys.version_info[0:2])
+ if max_ver is not None:
+ wheel = next(p for v, p in versions if v <= max_ver)
else:
wheel = versions[0][1]
wheels.append(wheel)
@@ -1035,8 +1047,8 @@ def _install_wheel_with_search_dir(download, project_names, py_executable, searc
# PIP_FIND_LINKS uses space as the path separator and thus cannot have paths
# with spaces in them. Convert any of those to local file:// URL form.
try:
- from urlparse import urljoin
from urllib import pathname2url
+ from urlparse import urljoin
except ImportError:
from urllib.parse import urljoin
from urllib.request import pathname2url
@@ -1097,13 +1109,13 @@ def _install_wheel_with_search_dir(download, project_names, py_executable, searc
)
).encode("utf8")
- if sys.version_info[0:2] == (3, 4):
- if "pip" in project_names:
- at = project_names.index("pip")
- project_names[at] = "pip<19.2"
- if "setuptools" in project_names:
- at = project_names.index("setuptools")
- project_names[at] = "setuptools<44"
+ def _get_max(project):
+ max_ver = MAX_VER.get(project, {}).get(sys.version_info[0:2])
+ if max_ver is not None:
+ project = '{}<={}'.format(project, '.'.join(str(i) for i in max_ver))
+ return project
+
+ project_names = [_get_max(p) for p in project_names]
cmd = [py_executable, "-"] + project_names
logger.start_progress("Installing {}...".format(", ".join(project_names)))
@@ -1399,7 +1411,7 @@ def copy_include_dir(include_src, include_dest, symlink):
def copy_tcltk(src, dest, symlink):
- """ copy tcl/tk libraries on Windows (issue #93) """
+ """copy tcl/tk libraries on Windows (issue #93)"""
for lib_version in "8.5", "8.6":
for libname in "tcl", "tk":
src_dir = join(src, "tcl", libname + lib_version)
diff --git a/virtualenv_support/setuptools-50.3.2-py3-none-any.whl b/virtualenv_support/setuptools-50.3.2-py3-none-any.whl
new file mode 100644
index 0000000..56d1bf9
--- /dev/null
+++ b/virtualenv_support/setuptools-50.3.2-py3-none-any.whl
Binary files differ