(ctx *gcp.Context, l *libcnb.Layer, reqs []string, installerName string, targetPlatform string, cmdBuilder func(string) []string)
| 704 | |
| 705 | func baseuvPipInstallArgs(req string) []string { |
| 706 | cmd := []string{"uv", "pip", "install"} |
| 707 | if req == "." { |
| 708 | cmd = append(cmd, ".") |
| 709 | } else { |
| 710 | cmd = append(cmd, "-r", req) |
| 711 | } |
| 712 | // --reinstall: Reinstall all packages to ensure fresh installation. |
| 713 | // --link-mode=copy: Copy files instead of hardlinking to ensure the target |
| 714 | // directory is self-contained and portable. |
| 715 | cmd = append(cmd, "--reinstall", "--link-mode=copy") |
| 716 | return appendVendoringFlags(cmd) |
| 717 | } |
| 718 | |
| 719 | func installDependenciesToTarget(ctx *gcp.Context, l *libcnb.Layer, reqs []string, installerName string, targetPlatform string, cmdBuilder func(string) []string) error { |
| 720 | targetDir, targetPath := resolvePipTargetPaths(ctx) |
| 721 | ctx.Logf("Installing dependencies to target directory: %s using %s", targetDir, installerName) |
| 722 | |
| 723 | separator := ":" |
| 724 | if strings.HasPrefix(targetPlatform, "windows") { |
| 725 | separator = ";" |
no test coverage detected