Skip to content

Commit 4ad27a6

Browse files
committed
ci: fix setuptools missing in plugin isolated env
1 parent f5496de commit 4ad27a6

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

test/test_misc/test_plugins.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,25 @@ def ctx_plugin(tmp_path: Path, plugin_src: Path) -> Generator[None, None, None]:
3131
base = tmp_path / f"{hash(plugin_src)}"
3232
pypath = (base / "pypath").absolute()
3333
plugpath = (base / "plugin").absolute()
34+
wheel_cache = (base / "wheel_cache").absolute()
35+
wheel_cache.mkdir(parents=True)
36+
37+
# Create a local wheel cache with setuptools and wheel
38+
subprocess.run(
39+
[
40+
sys.executable,
41+
"-m",
42+
"pip",
43+
"download",
44+
"--no-deps",
45+
"--dest",
46+
f"{wheel_cache}",
47+
"setuptools",
48+
"wheel",
49+
],
50+
check=True,
51+
)
52+
3453
shutil.copytree(plugin_src, plugpath)
3554
logging.debug("Installing %s into %s", plugin_src, pypath)
3655
subprocess.run(
@@ -43,6 +62,8 @@ def ctx_plugin(tmp_path: Path, plugin_src: Path) -> Generator[None, None, None]:
4362
"--no-input",
4463
"--no-clean",
4564
"--no-index",
65+
"--find-links",
66+
f"{wheel_cache}",
4667
"--disable-pip-version-check",
4768
"--target",
4869
f"{pypath}",

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ base = void
7070
deps =
7171
pytest==7.*
7272
pytest-cov==4.*
73+
setuptools>=68,<72
7374
setenv =
7475
BERKELEYDB_DIR = /usr
7576
COVERAGE_FILE = {env:COVERAGE_FILE:{toxinidir}/.coverage.{envname}}

0 commit comments

Comments
 (0)