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

Method Install

pkg/python/python.go:346–354  ·  view source on GitHub ↗

Install installs python dependencies to the target directory specified by GOOGLE_PIP_TARGET_DIR. If GOOGLE_PIP_TARGET_DIR is not set, it defaults to "lib".

(ctx *gcp.Context, l *libcnb.Layer, reqs ...string)

Source from the content-addressed store, hash-verified

344func PipTargetDir() string {
345 targetDir := os.Getenv(env.PipTargetDir)
346 if targetDir == "" {
347 targetDir = DefaultPipTargetDir
348 }
349 return targetDir
350}
351
352// Install installs python dependencies to the target directory specified by GOOGLE_PIP_TARGET_DIR.
353// If GOOGLE_PIP_TARGET_DIR is not set, it defaults to "lib".
354func (i MakerPipInstaller) Install(ctx *gcp.Context, l *libcnb.Layer, reqs ...string) error {
355 return installDependenciesToTarget(ctx, l, reqs, "pip", i.TargetPlatform, func(req string) []string {
356 cmd := basePipInstallArgs(req)
357 if len(cmd) > 0 {

Callers

nothing calls this directly

Calls 3

basePipInstallArgsFunction · 0.85
appendVendoringFlagsFunction · 0.85

Tested by

no test coverage detected