-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix] Move Python venv folder location to ~/.velocitas/packages/ #336
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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}`; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixes just the Python venv issue. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would argue this is not a package and should not go in the package path. My suggestion would be to move all project related data which is right now put into This would even be an easy fix by introducing and environment variable called |
||
let venvCreateCmd = command; | ||
if (command === 'pip') { | ||
venvCreateCmd = 'python'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should better do a minor update to the line 137 to use the right folder name
"package cache directory in the folder
.pyvenvs
."