MCPcopy Create free account
hub / github.com/celer-pkg/celer / setupPythonEnvs

Method setupPythonEnvs

buildsystems/buildconfig_envs.go:253–269  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

251}
252
253func (b BuildConfig) setupPythonEnvs() {
254 // Ensure PYTHONUSERBASE for pip.
255 b.envBackup.setenv("PYTHONUSERBASE", dirs.PythonUserBase)
256
257 // Set PYTHONPATH so build-time Python scripts can
258 // find packages in INSTALLED_DIR (tmp/deps) and the venv.
259 if buildtools.PythonTool != nil {
260 sitePackage := buildtools.PythonTool.SitePackagesDir()
261 installedDir := filepath.Join(dirs.TmpDepsDir, b.PortConfig.LibraryDir)
262 venvDir := buildtools.PythonTool.VenvDir()
263 paths := []string{
264 filepath.Join(installedDir, sitePackage),
265 filepath.Join(venvDir, sitePackage),
266 }
267 b.envBackup.setenv("PYTHONPATH", env.JoinPaths("PYTHONPATH", paths...))
268 }
269}
270
271func (b BuildConfig) setupQNXEnvs() {
272 toolchain := b.Ctx.Platform().GetToolchain()

Callers 1

setupEnvsMethod · 0.95

Calls 4

JoinPathsFunction · 0.92
setenvMethod · 0.80
SitePackagesDirMethod · 0.80
VenvDirMethod · 0.80

Tested by

no test coverage detected