internal/gomote: update package dependencies The cpython3 dependency should only be installed on Windows and Darwin. We can't be sure that the package exists for all other platforms. Updates golang/go#63992 Change-Id: I1d1063efc830eb9d347c5e18c0989bc1f5fe727b Reviewed-on: https://go-review.googlesource.com/c/build/+/542256 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Carlos Amedee <carlos@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
diff --git a/internal/gomote/swarming.go b/internal/gomote/swarming.go index 772308b..11f435f 100644 --- a/internal/gomote/swarming.go +++ b/internal/gomote/swarming.go
@@ -830,20 +830,21 @@ if err != nil { return "", err } - packages := []*swarmpb.CipdPackage{ {Path: "tools/bin", PackageName: "infra/tools/luci-auth/" + cipdPlatform, Version: "latest"}, {Path: "tools", PackageName: "golang/bootstrap-go/" + cipdPlatform, Version: "latest"}, - {Path: "tools", PackageName: "infra/3pp/tools/cpython3/" + cipdPlatform, Version: "latest"}, } pythonBin := "python3" - if goos == "windows" { - pythonBin = `tools\bin\python3.exe` - } else if goos == "darwin" { + switch goos { + case "darwin": pythonBin = `tools/bin/python3` - packages = append(packages, &swarmpb.CipdPackage{Path: "tools/bin", PackageName: "infra/tools/mac_toolchain/" + cipdPlatform, Version: "latest"}) + packages = append(packages, + &swarmpb.CipdPackage{Path: "tools/bin", PackageName: "infra/tools/mac_toolchain/" + cipdPlatform, Version: "latest"}, + &swarmpb.CipdPackage{Path: "tools", PackageName: "infra/3pp/tools/cpython3/" + cipdPlatform, Version: "latest"}) + case "windows": + pythonBin = `tools\bin\python3.exe` + packages = append(packages, &swarmpb.CipdPackage{Path: "tools", PackageName: "infra/3pp/tools/cpython3/" + cipdPlatform, Version: "latest"}) } - req := &swarmpb.NewTaskRequest{ Name: name, Priority: 20, // 30 is the priority for builds