Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions packages/pyright-scip/test/python-cli-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,13 @@ setup(
execSync(`python3 -m venv "${venvDir}"`, { stdio: 'pipe' });
const venvBinDir = path.join(venvDir, process.platform === 'win32' ? 'Scripts' : 'bin');
const pipPath = path.join(venvBinDir, 'pip');
// Install the fake package in the virtual environment
execSync(`"${pipPath}" install -e "${packageTempDir}"`, { stdio: 'pipe' });
// Install the fake package in the virtual environment. We use a regular
// (non-editable) install so the package's source files are recorded in
// the dist metadata across setuptools versions. Modern setuptools
// installs editable packages via an import-hook finder shim
// (__editable__..._finder.py), which importlib.metadata reports instead
// of the package's own .py files.
execSync(`"${pipPath}" install "${packageTempDir}"`, { stdio: 'pipe' });
// Simulate `source venv/bin/activate` by modifying PATH so that it propagates
// down to calls inside gatherPackageData.
const originalPath = process.env.PATH;
Expand Down