fix: ignore empty CIBW_ARCHS (#2541)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user