CheckUVIncompatibleDependencies checks for incompatible dependencies using uv pip check.
(ctx *gcp.Context, venvDir string)
| 662 | const UVDependencyInstallerCapability = "python.UVDependencyInstaller" |
| 663 | |
| 664 | // UVDependenciesInstaller is an interface for installing python dependencies |
| 665 | // using uv. |
| 666 | type 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. |
| 672 | func 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 | } |
no test coverage detected