summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2022-01-06 21:55:17 +0000
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2022-01-06 22:51:05 +0000
commit6c5c22e357705b922b775ad1aeee663398eb1b8c (patch)
tree4bfe7fb794c0629e89be45205fd38c20a8fadd40
parentf4776f2e5c624f47b803221f3211c30b05f4000d (diff)
downloadpython-setuptools-git-6c5c22e357705b922b775ad1aeee663398eb1b8c.tar.gz
Use setuptools wheel instead of source tree in integration tests
-rw-r--r--setup.cfg6
-rw-r--r--setuptools/tests/integration/test_pip_install_sdist.py12
2 files changed, 8 insertions, 10 deletions
diff --git a/setup.cfg b/setup.cfg
index 2f027faf..ce7dc5c8 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -69,9 +69,13 @@ testing-integration =
pytest
pytest-xdist
pytest-enabler
- virtualenv
+ virtualenv>=13.0.0
tomli
wheel
+ jaraco.path>=3.2.0
+ jaraco.envs>=2.2
+ build[virtualenv]
+ filelock>=3.4.0
docs =
diff --git a/setuptools/tests/integration/test_pip_install_sdist.py b/setuptools/tests/integration/test_pip_install_sdist.py
index 23801bc4..54955938 100644
--- a/setuptools/tests/integration/test_pip_install_sdist.py
+++ b/setuptools/tests/integration/test_pip_install_sdist.py
@@ -22,15 +22,11 @@ from urllib.request import urlopen
import pytest
from packaging.requirements import Requirement
-import setuptools
-
from .helpers import Archive, run
pytestmark = pytest.mark.integration
-SETUPTOOLS_ROOT = os.path.dirname(next(iter(setuptools.__path__)))
-
LATEST, = list(Enum("v", "LATEST"))
"""Default version to be checked"""
# There are positive and negative aspects of checking the latest version of the
@@ -117,7 +113,7 @@ ALREADY_LOADED = ("pytest", "mypy") # loaded by pytest/pytest-enabler
@pytest.mark.parametrize('package, version', EXAMPLES)
-def test_install_sdist(package, version, tmp_path, venv_python):
+def test_install_sdist(package, version, tmp_path, venv_python, setuptools_wheel):
venv_pip = (venv_python, "-m", "pip")
sdist = retrieve_sdist(package, version, tmp_path)
deps = build_deps(package, sdist)
@@ -127,10 +123,8 @@ def test_install_sdist(package, version, tmp_path, venv_python):
run([*venv_pip, "install", *deps])
# Use a virtualenv to simulate PEP 517 isolation
- # but install setuptools to force the version under development
- correct_setuptools = os.getenv("PROJECT_ROOT") or SETUPTOOLS_ROOT
- assert os.path.exists(os.path.join(correct_setuptools, "pyproject.toml"))
- run([*venv_pip, "install", "-Ie", correct_setuptools])
+ # but install fresh setuptools wheel to ensure the version under development
+ run([*venv_pip, "install", "-I", setuptools_wheel])
run([*venv_pip, "install", *SDIST_OPTIONS, sdist])
# Execute a simple script to make sure the package was installed correctly