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

Function CheckUVIncompatibleDependencies

pkg/python/python.go:664–674  ·  view source on GitHub ↗

CheckUVIncompatibleDependencies checks for incompatible dependencies using uv pip check.

(ctx *gcp.Context, venvDir string)

Source from the content-addressed store, hash-verified

662const UVDependencyInstallerCapability = "python.UVDependencyInstaller"
663
664// UVDependenciesInstaller is an interface for installing python dependencies
665// using uv.
666type UVDependenciesInstaller interface {
667 Install(ctx *gcp.Context, l *libcnb.Layer, reqs ...string) error
668}
669
670// CheckUVIncompatibleDependencies checks for incompatible dependencies using
671// uv pip check.
672func CheckUVIncompatibleDependencies(ctx *gcp.Context, venvDir string) error {
673 ctx.Logf("Checking for incompatible dependencies.")
674 result, err := ctx.Exec([]string{"uv", "pip", "check"}, gcp.WithUserAttribution, gcp.WithEnv("VIRTUAL_ENV="+venvDir))
675 if result == nil {
676 return fmt.Errorf("uv pip check: %w", err)
677 }

Callers 2

UVInstallRequirementsFunction · 0.85

Calls 2

LogfMethod · 0.80
ExecMethod · 0.80

Tested by

no test coverage detected