Skip to content

Commit a9c2e5c

Browse files
committed
pass --python to "uv pip install"
1 parent b6e7d1a commit a9c2e5c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

integration/bundle/init_default_python_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ func testDefaultPython(t *testing.T, pythonVersion string) {
6060
testcli.PrepareReplacementsUser(t, replacements, *user)
6161
}
6262

63-
tmpDir1 := pythontest.RequirePythonVENV(t, ctx, pythonVersion, true)
63+
tmpDir1, pythonExe := pythontest.RequirePythonVENV(t, ctx, pythonVersion, true)
6464
extras, ok := extraInstalls[pythonVersion]
6565
if ok {
66-
args := append([]string{"pip", "install"}, extras...)
66+
args := append([]string{"pip", "install", "--python", pythonExe}, extras...)
6767
testutil.RunCommand(t, "uv", args...)
6868
}
6969

libs/python/pythontest/pythontest.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/stretchr/testify/require"
1111
)
1212

13-
func RequirePythonVENV(t testutil.TestingT, ctx context.Context, pythonVersion string, checkVersion bool) string {
13+
func RequirePythonVENV(t testutil.TestingT, ctx context.Context, pythonVersion string, checkVersion bool) (string, string) {
1414
tmpDir := t.TempDir()
1515
testutil.Chdir(t, tmpDir)
1616

@@ -28,5 +28,5 @@ func RequirePythonVENV(t testutil.TestingT, ctx context.Context, pythonVersion s
2828
require.True(t, strings.HasPrefix(actualVersion, expectVersion), "Running %s --version: Expected %v, got %v", pythonExe, expectVersion, actualVersion)
2929
}
3030

31-
return tmpDir
31+
return tmpDir, pythonExe
3232
}

0 commit comments

Comments
 (0)