Skip to content

Commit

Permalink
Pin older setuptools for pip 9
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzymadness committed Jan 13, 2022
1 parent 1eb49a9 commit 30cb85e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
# Version of pip to test micropipenv with
# the default is the pip wheel bundled in virtualenv package
MICROPIPENV_TEST_PIP_VERSION = os.getenv("MICROPIPENV_TEST_PIP_VERSION")
# For some very old pips, we have to limit also setuptools version
MICROPIPENV_TEST_SETUPTOOLS_VERSION = os.getenv("MICROPIPENV_TEST_SETUPTOOLS_VERSION")
# pip version used in tests, assigned using pytest_configure
PIP_VERSION = None

Expand All @@ -46,6 +48,9 @@ def _venv_install_pip(venv):
else:
venv.install(f"pip{MICROPIPENV_TEST_PIP_VERSION}")

if MICROPIPENV_TEST_SETUPTOOLS_VERSION is not None:
venv.install(f"setuptools{MICROPIPENV_TEST_SETUPTOOLS_VERSION}")


def pytest_configure(config):
"""Configure tests before pytest collects tests."""
Expand Down
5 changes: 4 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ deps =
tomli: tomli
setenv =
# platform-python-pip and python27-pip in RHEL8
pip90: MICROPIPENV_TEST_PIP_VERSION = >=9.0,<10.0
# pip 9 seems not to be compatible with the latest setuptools
# so we are using the same version we have in RHEL 8
pip90: MICROPIPENV_TEST_PIP_VERSION = >=9.0,<10.0
pip90: MICROPIPENV_TEST_SETUPTOOLS_VERSION = <60
# older version in Python 3.8 module
pip192: MICROPIPENV_TEST_PIP_VERSION = >=19.2,<19.3
# first version with manylinux2014 support, Python 3.8 module, Fedora 32
Expand Down

0 comments on commit 30cb85e

Please sign in to comment.