Skip to content

Commit 460195f

Browse files
committed
[GR-75506] Export CI pip indexes
1 parent 9670e28 commit 460195f

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

ci/python-bench.libsonnet

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,16 @@
9090
local environment(os, arch) = self.environment(os, arch) + {
9191
BENCH_RESULTS_FILE_PATH: "bench-results.json",
9292
PANDAS_REPO_URL: $.overlay_imports.PANDAS_REPO_GIT,
93+
} + if $.overlay_imports.PIP_EXTRA_INDEX_URL != "" then {
9394
PIP_EXTRA_INDEX_URL: $.overlay_imports.PIP_EXTRA_INDEX_URL,
94-
},
95+
} else {},
96+
97+
local pip_index_setup = [
98+
// Use the CI Python's configured base index and overlay-provided GraalPy wheel index.
99+
["set-export", "PIP_INDEX_URL", ["python", "-m", "pip", "config", "get", "global.index-url"]],
100+
] + if $.overlay_imports.PIP_EXTRA_INDEX_URL != "" then [
101+
["set-export", "PIP_EXTRA_INDEX_URL", $.overlay_imports.PIP_EXTRA_INDEX_URL],
102+
] else [],
95103

96104
local packages(os, arch) = self.packages(os, arch) + {
97105
make: ">=3.83",
@@ -193,7 +201,7 @@
193201
"--pythonjavadriver-vm-config"
194202
else
195203
super.vm_config_name,
196-
setup+: [
204+
setup+: pip_index_setup + [
197205
// NOTE: logic shared with ci/python-gate.libsonnet, keep in sync
198206
// ensure we get graal-enterprise as a hostvm
199207
["git", "clone", $.overlay_imports.GRAAL_ENTERPRISE_GIT, "${BUILD_DIR}/graal-enterprise"],

ci/python-gate.libsonnet

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,13 @@
194194
buildslave_ol8: ENVIRONMENT_DIFF_OL8,
195195
},
196196

197+
local pip_index_setup = [
198+
// Use the CI Python's configured base index and overlay-provided GraalPy wheel index.
199+
["set-export", "PIP_INDEX_URL", ["python", "-m", "pip", "config", "get", "global.index-url"]],
200+
] + if $.overlay_imports.PIP_EXTRA_INDEX_URL != "" then [
201+
["set-export", "PIP_EXTRA_INDEX_URL", $.overlay_imports.PIP_EXTRA_INDEX_URL],
202+
] else [],
203+
197204
//------------------------------------------------------------------------------------------------------------------
198205
// packages
199206
//------------------------------------------------------------------------------------------------------------------
@@ -461,7 +468,7 @@
461468
guard+: {
462469
excludes+: ["**.md", "docs/**", "3rd_party_licenses.txt", "scripts/**"],
463470
},
464-
setup+: [
471+
setup+: pip_index_setup + [
465472
// force imports the main repository to get the right graal commit
466473
["mx"] + self.mx_parameters + ["sforceimports"],
467474
// logging

0 commit comments

Comments
 (0)