Skip to content

Commit a4c6d16

Browse files
authored
fix: ignore empty CIBW_ARCHS (#2541)
1 parent 78a246a commit a4c6d16

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

cibuildwheel/options.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,9 @@ def globals(self) -> GlobalOptions:
657657
)
658658
requires_python = None if requires_python_str is None else SpecifierSet(requires_python_str)
659659

660-
archs_config_str = args.archs or self.reader.get("archs", option_format=ListFormat(sep=" "))
660+
archs_config_str = args.archs or self.reader.get(
661+
"archs", option_format=ListFormat(sep=" "), ignore_empty=True
662+
)
661663
architectures = Architecture.parse_config(archs_config_str, platform=self.platform)
662664

663665
# Process `--only`

unit_test/main_tests/main_platform_test.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,3 +278,12 @@ def test_pyodide_on_windows(monkeypatch, capsys):
278278

279279
assert exit.value.code == 2
280280
assert "Building for pyodide is not supported on Windows" in err
281+
282+
283+
def test_empty_archs_platform(platform, intercepted_build_args, monkeypatch):
284+
monkeypatch.setenv("CIBW_ARCHS", "")
285+
286+
main()
287+
288+
options = intercepted_build_args.args[0]
289+
assert options.globals.architectures == Architecture.auto_archs(platform)

0 commit comments

Comments
 (0)