Skip to content

Commit 9737cbb

Browse files
committed
[GR-75506] Remove hardcoded tox PyPI mirror
PullRequest: graalpython/4560
2 parents 5a98e9e + 460195f commit 9737cbb

3 files changed

Lines changed: 27 additions & 7 deletions

File tree

ci/python-bench.libsonnet

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

97105
local packages(os, arch) = self.packages(os, arch) + {
98106
make: ">=3.83",
@@ -194,7 +202,7 @@
194202
"--pythonjavadriver-vm-config"
195203
else
196204
super.vm_config_name,
197-
setup+: [
205+
setup+: pip_index_setup + [
198206
// NOTE: logic shared with ci/python-gate.libsonnet, keep in sync
199207
// ensure we get graal-enterprise as a hostvm
200208
["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

graalpython/com.oracle.graal.python.test/src/tox/leftpad/tox.ini

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ commands =
99

1010
[testenv:graalpy]
1111
basepython=graalpy
12-
setenv=
13-
PIP_INDEX_URL=https://ol-graal.oraclecorp.com/nexus-cache/repository/pypi-proxy/simple/
14-
PIP_TRUSTED_HOST=ol-graal.oraclecorp.com
15-
passenv = GRAALPY_LEFTPAD_FAIL,GRAAL_PYTHON_ARGS,GRAAL_PYTHON_VM_ARGS
12+
passenv =
13+
GRAALPY_LEFTPAD_FAIL
14+
GRAAL_PYTHON_ARGS
15+
GRAAL_PYTHON_VM_ARGS
16+
PIP_EXTRA_INDEX_URL
17+
PIP_INDEX_URL
18+
PIP_RETRIES
19+
PIP_TIMEOUT
20+
PIP_TRUSTED_HOST

0 commit comments

Comments
 (0)