stubtest_third_party.py: Make it work on Windows (#8720)

This commit is contained in:
Alex Waygood
2022-09-10 23:06:46 +01:00
committed by GitHub
parent 04a88d5740
commit ed29fc5557

View File

@@ -38,8 +38,14 @@ def run_stubtest(dist: Path, *, verbose: bool = False) -> bool:
venv_dir = Path(tmp)
venv.create(venv_dir, with_pip=True, clear=True)
pip_exe = str(venv_dir / "bin" / "pip")
python_exe = str(venv_dir / "bin" / "python")
if sys.platform == "win32":
pip = venv_dir / "Scripts" / "pip.exe"
python = venv_dir / "Scripts" / "python.exe"
else:
pip = venv_dir / "bin" / "pip"
python = venv_dir / "bin" / "python"
pip_exe, python_exe = str(pip), str(python)
dist_version = metadata["version"]
extras = stubtest_meta.get("extras", [])