Stop forcing an older version of setuptools

This commit is contained in:
Pedro Algarvio 2021-02-25 07:02:15 +00:00
parent ce0c6954c5
commit 4d3b4ad819
8 changed files with 14 additions and 11 deletions

View file

@ -270,9 +270,12 @@ def _install_requirements(session, transport, *extra_requirements):
)
return
# setuptools 50.0.0 is broken
# https://github.com/pypa/setuptools/issues?q=is%3Aissue+setuptools+50+
install_command = ["--progress-bar=off", "-U", "setuptools<50.0.0"]
install_command = [
"--progress-bar=off",
"-U",
"pip",
"setuptools!=50.*,!=51.*,!=52.*",
]
session.install(*install_command, silent=PIP_INSTALL_SILENT)
# Install requirements

View file

@ -46,7 +46,7 @@
install-working-setuptools:
pip.installed:
- name: 'setuptools<50.0.0'
- name: 'setuptools!=50.*,!=51.*,!=52.*'
- bin_env: {{ venv_dir }}
- require:
- virtualenv: {{ venv_dir }}

View file

@ -15,7 +15,7 @@
install-working-setuptools:
pip.installed:
- name: 'setuptools<50.0.0'
- name: 'setuptools!=50.*,!=51.*,!=52.*'
- bin_env: {{ venv_dir }}
- require:
- virtualenv: {{ venv_dir }}

View file

@ -11,7 +11,7 @@
install-working-setuptools:
pip.installed:
- name: 'setuptools<50.0.0'
- name: 'setuptools!=50.*,!=51.*,!=52.*'
- bin_env: {{ virtualenv_base }}
- require:
- virtualenv: {{ virtualenv_base }}

View file

@ -12,7 +12,7 @@
install-working-setuptools:
pip.installed:
- name: 'setuptools<50.0.0'
- name: 'setuptools!=50.*,!=51.*,!=52.*'
- bin_env: {{ virtualenv_base }}
- require:
- virtualenv: {{ virtualenv_base }}

View file

@ -10,7 +10,7 @@
install-working-setuptools:
pip.installed:
- name: 'setuptools<50.0.0'
- name: 'setuptools!=50.*,!=51.*,!=52.*'
- bin_env: {{ virtualenv_base }}
- require:
- virtualenv: {{ virtualenv_base }}

View file

@ -1738,9 +1738,7 @@ class VirtualEnv:
sminion.functions.virtualenv.create(
self.venv_dir, python=self._get_real_python()
)
self.install("-U", "pip")
# https://github.com/pypa/setuptools/issues?q=is%3Aissue+setuptools+50+
self.install("-U", "setuptools<50.0.0")
self.install("-U", "pip", "setuptools!=50.*,!=51.*,!=52.*")
@contextmanager

View file

@ -78,6 +78,8 @@ class Base(TestCase, LoaderModuleMockMixin):
subprocess.check_call(
[salt.utils.path.which_bin(KNOWN_VIRTUALENV_BINARY_NAMES), cls.ppy_st]
)
# Setuptools >=53.0.0 no longer has easy_install
# Between 50.0.0 and 53.0.0 it has problems with salt, use an older version
subprocess.check_call(
[os.path.join(cls.bin_st, "pip"), "install", "-U", "setuptools<50.0.0"]
)