Skip to content

Commit b9bfcd2

Browse files
authored
Allow dots in machine/ISA specifier (#78)
1 parent 514da9c commit b9bfcd2

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/python_discovery/_py_spec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
(?P<version>[0-9.]+)? # version (e.g. 3.12, 3.12.1)
1818
(?P<threaded>t)? # free-threaded flag
1919
(?:-(?P<arch>32|64))? # architecture bitness
20-
(?:-(?P<machine>[a-zA-Z0-9_]+))? # ISA (e.g. arm64, x86_64)
20+
(?:-(?P<machine>[a-zA-Z0-9_.]+))? # ISA (e.g. arm64, x86_64, i86pc.64bit)
2121
$
2222
""",
2323
re.VERBOSE,

tests/test_py_spec.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ def test_specifier_satisfies_with_partial_information() -> None:
180180
pytest.param("cpython3.12-64", None, id="no-machine"),
181181
pytest.param("cpython3.12", None, id="no-arch-no-machine"),
182182
pytest.param("python3.12-64-arm64", "arm64", id="python-impl"),
183+
pytest.param("cpython3.14-64-i86pc.64bit", "i86pc.64bit", id="dotted-machine"),
183184
],
184185
)
185186
def test_spec_parse_machine(spec_str: str, expected_machine: str | None) -> None:

0 commit comments

Comments
 (0)