From 597e27d80133506d550b69bf78282b6b819fde28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 27 Feb 2020 15:57:02 +0100 Subject: [PATCH] Explicitly require setuptools < 44 with Python 3.4 --- python-virtualenv.spec | 1 + rpm-wheels.patch | 30 ++++++++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/python-virtualenv.spec b/python-virtualenv.spec index ac11af3..9931530 100644 --- a/python-virtualenv.spec +++ b/python-virtualenv.spec @@ -142,6 +142,7 @@ rm -r tmp_path %changelog * Tue Feb 25 2020 Miro HronĨok - 16.7.10-1 - Update to 16.7.10 +- Explicitly require setuptools < 44 with Python 3.4 * Thu Jan 30 2020 Fedora Release Engineering - 16.7.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/rpm-wheels.patch b/rpm-wheels.patch index 36cc22b..5f5aa74 100644 --- a/rpm-wheels.patch +++ b/rpm-wheels.patch @@ -1,8 +1,8 @@ diff --git a/virtualenv.py b/virtualenv.py -index 8f05739..cd10e9f 100755 +index c7f71e6..3740014 100755 --- a/virtualenv.py +++ b/virtualenv.py -@@ -476,7 +476,18 @@ def virtualenv_support_dirs(): +@@ -475,7 +475,18 @@ def virtualenv_support_dirs(): # normal filesystem installation if os.path.isdir(join(HERE, "virtualenv_support")): @@ -22,3 +22,29 @@ index 8f05739..cd10e9f 100755 elif IS_ZIPAPP: tmpdir = tempfile.mkdtemp() try: +@@ -998,6 +998,8 @@ 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 == "setuptools" and sys.version_info[0:2] == (3, 4): ++ wheel = next(p for v, p in versions if v < (44,)) + else: + wheel = versions[0][1] + wheels.append(wheel) +@@ -1091,9 +1093,13 @@ def _install_wheel_with_search_dir(download, project_names, py_executable, searc + ) + ).encode("utf8") + +- if sys.version_info[0:2] == (3, 4) and "pip" in project_names: +- at = project_names.index("pip") +- project_names[at] = "pip<19.2" ++ 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" + + cmd = [py_executable, "-"] + project_names + logger.start_progress("Installing {}...".format(", ".join(project_names)))