fix: ignore empty CIBW_ARCHS (#2541)

This commit is contained in:
Matthieu Darbois
2025-08-11 10:50:25 -04:00
committed by GitHub
parent 78a246a901
commit a4c6d16811
2 changed files with 12 additions and 1 deletions
+3 -1
View File
@@ -657,7 +657,9 @@ class Options:
)
requires_python = None if requires_python_str is None else SpecifierSet(requires_python_str)
archs_config_str = args.archs or self.reader.get("archs", option_format=ListFormat(sep=" "))
archs_config_str = args.archs or self.reader.get(
"archs", option_format=ListFormat(sep=" "), ignore_empty=True
)
architectures = Architecture.parse_config(archs_config_str, platform=self.platform)
# Process `--only`
@@ -278,3 +278,12 @@ def test_pyodide_on_windows(monkeypatch, capsys):
assert exit.value.code == 2
assert "Building for pyodide is not supported on Windows" in err
def test_empty_archs_platform(platform, intercepted_build_args, monkeypatch):
monkeypatch.setenv("CIBW_ARCHS", "")
main()
options = intercepted_build_args.args[0]
assert options.globals.architectures == Architecture.auto_archs(platform)