Skip to content

Commit

Permalink
Add config for index url
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanking13 committed Nov 25, 2024
1 parent ea85b85 commit 627a0a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyodide_build/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ def to_env(self) -> dict[str, str]:
"path": "PATH",
"zip_compression_level": "PYODIDE_ZIP_COMPRESSION_LEVEL",
"skip_emscripten_version_check": "SKIP_EMSCRIPTEN_VERSION_CHECK",
"build_dependency_index_url": "BUILD_DEPENDENCY_INDEX_URL",
# maintainer only
"_f2c_fixes_wrapper": "_F2C_FIXES_WRAPPER",
}
Expand All @@ -190,6 +191,7 @@ def to_env(self) -> dict[str, str]:
"rust_toolchain",
"meson_cross_file",
"skip_emscripten_version_check",
"build_dependency_index_url",
# maintainer only
"_f2c_fixes_wrapper",
}
Expand All @@ -208,6 +210,7 @@ def to_env(self) -> dict[str, str]:
# Other configuration
"pyodide_jobs": "1",
"skip_emscripten_version_check": "0",
"build_dependency_index_url": "https://pypi.anaconda.org/pyodide/simple",
# maintainer only
"_f2c_fixes_wrapper": "",
}
Expand Down
2 changes: 2 additions & 0 deletions pyodide_build/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def test_load_config_from_file(
ldflags = "-L/path/to/lib"
rust_toolchain = "nightly"
meson_cross_file = "$(MESON_CROSS_FILE)"
build_dependency_index_url = "https://example.com/simple"
""")

xbuildenv_manager = CrossBuildEnvManager(
Expand All @@ -103,6 +104,7 @@ def test_load_config_from_file(
assert config["ldflags"] == "-L/path/to/lib"
assert config["rust_toolchain"] == "nightly"
assert config["meson_cross_file"] == "/path/to/crossfile"
assert config["build_dependency_index_url"] == "https://example.com/simple"

def test_config_all(self, dummy_xbuildenv, reset_env_vars, reset_cache):
xbuildenv_manager = CrossBuildEnvManager(
Expand Down

0 comments on commit 627a0a9

Please sign in to comment.