diff --git a/docs/features/PACKAGES.md b/docs/features/PACKAGES.md index 66dbfc5..de3e97b 100644 --- a/docs/features/PACKAGES.md +++ b/docs/features/PACKAGES.md @@ -135,7 +135,7 @@ Other Python processes spawned from a Python-based program will **not** be autom (Because the dependencies of that scripts will probably differ from those of the calling program's component.) The venv of each component is created within the project cache directory in the folder `pyvenv`. For example the -component `Foo`s venv would be located in `/home/vscode/.velocitas/projects//pyvenv/foo/`. This also contains +component `Foo`s venv would be located in `/home/vscode/.velocitas/packages/.pyvenvs/foo/`. This also contains the installed dependencies of that component. ### `id` - string diff --git a/src/modules/exec.ts b/src/modules/exec.ts index 2ea080f..e589ca0 100644 --- a/src/modules/exec.ts +++ b/src/modules/exec.ts @@ -16,6 +16,7 @@ import { IPty, spawn } from 'node-pty'; import { exec } from 'node:child_process'; import { resolve } from 'node:path'; import { ExecSpec, ProgramSpec } from './component'; +import { getPackageFolderPath } from './package'; import { ProjectCache } from './project-cache'; import { ProjectConfig } from './projectConfig/projectConfig'; import { stdOutParser } from './stdout-parser'; @@ -151,7 +152,7 @@ async function createPythonVenv( cwd: string, loggingOptions: { writeStdout?: boolean; verbose?: boolean }, ) { - const venvDir = `${ProjectCache.getCacheDir()}/pyvenv/${componentId}`; + const venvDir = `${getPackageFolderPath()}/.pyvenvs/${componentId}`; let venvCreateCmd = command; if (command === 'pip') { venvCreateCmd = 'python';