Skip to content
This repository was archived by the owner on Aug 17, 2025. It is now read-only.

Commit 4c72be5

Browse files
fix: allow python tests to use custom repo
1 parent bab3796 commit 4c72be5

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

python-runtime/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Building with a custom artifact repository
2+
3+
In order to run the tests with a custom artifact repository you need to run:
4+
5+
`export PYTHON_REPOSITORY=<your-private-repo>`
6+
7+
The tests on `compile/build_test.go` will use this to run `uv --index $PYTHON_REPOSITORY --native-tls` which
8+
should get the tests to pass.

python-runtime/compile/build_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ func TestBuild(t *testing.T) {
2020
assert.NoError(t, err)
2121
ctx := log.ContextWithNewDefaultLogger(context.Background())
2222
assert.NoError(t, os.RemoveAll(filepath.Join(moduleDir, ".venv")))
23-
assert.NoError(t, exec.Command(ctx, log.Debug, moduleDir, "uv", "sync").Run())
23+
env := os.Getenv("PYTHON_REPOSITORY")
24+
args := []string{"sync"}
25+
if env != "" {
26+
args = append(args, "--index", env, "--native-tls")
27+
}
28+
assert.NoError(t, exec.Command(ctx, log.Debug, moduleDir, "uv", args...).Run())
2429

2530
t.Run("schema extraction", func(t *testing.T) {
2631
config := moduleconfig.AbsModuleConfig{

python-runtime/ftl/README.md

Whitespace-only changes.

0 commit comments

Comments
 (0)