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

Function AppendPythonBinDir

envs/unix.go:58–67  ·  view source on GitHub ↗

AppendPythonBinDir adds the Python virtual environment bin directory to PATH.

(venvDir string)

Source from the content-addressed store, hash-verified

56
57// AppendPythonBinDir adds the Python virtual environment bin directory to PATH.
58func AppendPythonBinDir(venvDir string) {
59 if venvDir == "" {
60 return
61 }
62
63 binDir := filepath.Join(venvDir, "bin")
64 if fileio.PathExists(binDir) {
65 os.Setenv("PATH", env.JoinPaths("PATH", binDir))
66 }
67}

Callers 1

pip3InstallFunction · 0.92

Calls 2

PathExistsFunction · 0.92
JoinPathsFunction · 0.92

Tested by

no test coverage detected