MCPcopy Index your code
hub / github.com/celer-pkg/celer / getPythonVenvPath

Function getPythonVenvPath

buildtools/setup_python.go:241–249  ·  view source on GitHub ↗
(pythonVersion, projectName string)

Source from the content-addressed store, hash-verified

239}
240
241func getPythonVenvPath(pythonVersion, projectName string) string {
242 // Normalize version to minor version format for directory name (e.g., 3.10.5 -> 3.10)
243 minorVersion := pythonVersion
244 if strings.Count(pythonVersion, ".") > 1 {
245 parts := strings.Split(pythonVersion, ".")
246 minorVersion = parts[0] + "." + parts[1]
247 }
248 return filepath.Join(dirs.WorkspaceDir, "installed", fmt.Sprintf("venv-%s@%s", minorVersion, projectName))
249}
250
251// GetDefaultPythonVersion returns the default Python version for the current platform.
252// - Windows: reads from buildtools/static TOML python tool definition (via GetDefaultPythonVersion from build_tools.go)

Callers 2

pip3InstallFunction · 0.85
setupPythonFunction · 0.85

Calls 1

SprintfMethod · 0.80

Tested by

no test coverage detected