Skip to content

Commit b887417

Browse files
authored
fix: enable all shall not enable cpython-experimental-riscv64 (#2528)
1 parent 36c5079 commit b887417

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

cibuildwheel/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ def globals(self) -> GlobalOptions:
665665
build_config = args.only
666666
skip_config = ""
667667
architectures = Architecture.all_archs(self.platform)
668-
enable |= set(EnableGroup) - {EnableGroup.CPythonExperimentalRiscV64}
668+
enable |= EnableGroup.all_groups()
669669

670670
build_selector = BuildSelector(
671671
build_config=build_config,

cibuildwheel/selector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class EnableGroup(StrEnum):
3939

4040
@classmethod
4141
def all_groups(cls) -> frozenset["EnableGroup"]:
42-
return frozenset(cls)
42+
return frozenset(set(cls) - {cls.CPythonExperimentalRiscV64})
4343

4444
@classmethod
4545
def parse_option_value(cls, value: str) -> frozenset["EnableGroup"]:

unit_test/main_tests/main_options_test.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,24 @@ def test_riscv64_no_warning(monkeypatch, capsys, tmp_path):
188188
assert "'cpython-experimental-riscv64' enable is deprecated" not in err
189189

190190

191+
@pytest.mark.usefixtures("platform", "intercepted_build_args")
192+
def test_riscv64_no_warning2(monkeypatch, capsys, tmp_path):
193+
local_path = tmp_path / "tmp_project"
194+
os.mkdir(local_path) # noqa:PTH102 Path.mkdir has been monkeypatched already
195+
local_path.joinpath("setup.py").touch()
196+
197+
monkeypatch.setattr(
198+
sys, "argv", ["cibuildwheel", "--only", "cp313-manylinux_riscv64", str(local_path)]
199+
)
200+
monkeypatch.setenv("CIBW_ENABLE", "all")
201+
202+
main()
203+
204+
_, err = capsys.readouterr()
205+
print(err)
206+
assert "'cpython-experimental-riscv64' enable is deprecated" not in err
207+
208+
191209
@pytest.mark.parametrize(
192210
("architecture", "image", "full_image"),
193211
[

0 commit comments

Comments
 (0)