MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/buildpacks / resolvePipTargetPaths

Function resolvePipTargetPaths

pkg/python/python.go:724–733  ·  view source on GitHub ↗
(ctx *gcp.Context)

Source from the content-addressed store, hash-verified

722
723 separator := ":"
724 if strings.HasPrefix(targetPlatform, "windows") {
725 separator = ";"
726 }
727
728 // We set PYTHONPATH so that the python interpreter can find the dependencies
729 // in the target directory. We also add the application root to PYTHONPATH so
730 // that the application can import modules from the root.
731 l.LaunchEnvironment.Override("PYTHONPATH", targetDir+separator+".")
732 l.SharedEnvironment.Override("PYTHONPATH", targetPath+string(os.PathListSeparator)+ctx.ApplicationRoot())
733
734 return installRequirementsToTarget(ctx, targetPath, reqs, cmdBuilder)
735}
736

Callers 1

Calls 2

PipTargetDirFunction · 0.85
ApplicationRootMethod · 0.80

Tested by

no test coverage detected