feat: adding pypy-eol enable group (#2393)
This commit is contained in:
@@ -36,6 +36,7 @@ $defs:
|
|||||||
- cpython-freethreading
|
- cpython-freethreading
|
||||||
- cpython-prerelease
|
- cpython-prerelease
|
||||||
- pypy
|
- pypy
|
||||||
|
- pypy-eol
|
||||||
- cpython-experimental-riscv64
|
- cpython-experimental-riscv64
|
||||||
description: A Python version or flavor to enable.
|
description: A Python version or flavor to enable.
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"cpython-freethreading",
|
"cpython-freethreading",
|
||||||
"cpython-prerelease",
|
"cpython-prerelease",
|
||||||
"pypy",
|
"pypy",
|
||||||
|
"pypy-eol",
|
||||||
"cpython-experimental-riscv64"
|
"cpython-experimental-riscv64"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class EnableGroup(StrEnum):
|
|||||||
CPythonFreeThreading = "cpython-freethreading"
|
CPythonFreeThreading = "cpython-freethreading"
|
||||||
CPythonPrerelease = "cpython-prerelease"
|
CPythonPrerelease = "cpython-prerelease"
|
||||||
PyPy = "pypy"
|
PyPy = "pypy"
|
||||||
|
PyPyEoL = "pypy-eol"
|
||||||
CPythonExperimentalRiscV64 = "cpython-experimental-riscv64"
|
CPythonExperimentalRiscV64 = "cpython-experimental-riscv64"
|
||||||
GraalPy = "graalpy"
|
GraalPy = "graalpy"
|
||||||
|
|
||||||
@@ -87,7 +88,9 @@ class BuildSelector:
|
|||||||
return False
|
return False
|
||||||
if EnableGroup.CPythonPrerelease not in self.enable and fnmatch(build_id, "cp314*"):
|
if EnableGroup.CPythonPrerelease not in self.enable and fnmatch(build_id, "cp314*"):
|
||||||
return False
|
return False
|
||||||
if EnableGroup.PyPy not in self.enable and fnmatch(build_id, "pp*"):
|
if EnableGroup.PyPy not in self.enable and fnmatch(build_id, "pp31*"):
|
||||||
|
return False
|
||||||
|
if EnableGroup.PyPyEoL not in self.enable and fnmatch(build_id, "pp3?-*"):
|
||||||
return False
|
return False
|
||||||
if EnableGroup.CPythonExperimentalRiscV64 not in self.enable and fnmatch(
|
if EnableGroup.CPythonExperimentalRiscV64 not in self.enable and fnmatch(
|
||||||
build_id, "*_riscv64"
|
build_id, "*_riscv64"
|
||||||
|
|||||||
@@ -321,6 +321,7 @@ values are:
|
|||||||
The build identifiers for those variants have a `t` suffix in their
|
The build identifiers for those variants have a `t` suffix in their
|
||||||
`python_tag` (e.g. `cp313t-manylinux_x86_64`).
|
`python_tag` (e.g. `cp313t-manylinux_x86_64`).
|
||||||
- `pypy`: Enable PyPy.
|
- `pypy`: Enable PyPy.
|
||||||
|
- `pypy-eol`: Enable PyPy versions that have passed end of life (if still available).
|
||||||
- `cpython-experimental-riscv64`: Enable experimental riscv64 builds. Those builds
|
- `cpython-experimental-riscv64`: Enable experimental riscv64 builds. Those builds
|
||||||
are disabled by default as they can't be uploaded to PyPI and a PEP will most likely
|
are disabled by default as they can't be uploaded to PyPI and a PEP will most likely
|
||||||
be required before this can happen.
|
be required before this can happen.
|
||||||
|
|||||||
+4
-1
@@ -254,10 +254,13 @@ def _expected_wheels(
|
|||||||
if EnableGroup.CPythonFreeThreading in enable_groups:
|
if EnableGroup.CPythonFreeThreading in enable_groups:
|
||||||
python_abi_tags.append("cp314-cp314t")
|
python_abi_tags.append("cp314-cp314t")
|
||||||
|
|
||||||
if EnableGroup.PyPy in enable_groups:
|
if EnableGroup.PyPyEoL in enable_groups:
|
||||||
python_abi_tags += [
|
python_abi_tags += [
|
||||||
"pp38-pypy38_pp73",
|
"pp38-pypy38_pp73",
|
||||||
"pp39-pypy39_pp73",
|
"pp39-pypy39_pp73",
|
||||||
|
]
|
||||||
|
if EnableGroup.PyPy in enable_groups:
|
||||||
|
python_abi_tags += [
|
||||||
"pp310-pypy310_pp73",
|
"pp310-pypy310_pp73",
|
||||||
"pp311-pypy311_pp73",
|
"pp311-pypy311_pp73",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ def test_build():
|
|||||||
assert build_selector("cp311-manylinux_x86_64")
|
assert build_selector("cp311-manylinux_x86_64")
|
||||||
assert build_selector("cp312-manylinux_x86_64")
|
assert build_selector("cp312-manylinux_x86_64")
|
||||||
assert build_selector("cp313-manylinux_x86_64")
|
assert build_selector("cp313-manylinux_x86_64")
|
||||||
assert build_selector("pp36-manylinux_x86_64")
|
assert build_selector("pp310-manylinux_x86_64")
|
||||||
assert build_selector("pp37-manylinux_x86_64")
|
assert build_selector("pp311-manylinux_x86_64")
|
||||||
assert build_selector("cp36-manylinux_i686")
|
assert build_selector("cp36-manylinux_i686")
|
||||||
assert build_selector("cp37-manylinux_i686")
|
assert build_selector("cp37-manylinux_i686")
|
||||||
assert build_selector("cp36-macosx_intel")
|
assert build_selector("cp36-macosx_intel")
|
||||||
@@ -23,20 +23,20 @@ def test_build():
|
|||||||
assert build_selector("cp39-macosx_intel")
|
assert build_selector("cp39-macosx_intel")
|
||||||
assert build_selector("cp39-macosx_universal2")
|
assert build_selector("cp39-macosx_universal2")
|
||||||
assert build_selector("cp39-macosx_arm64")
|
assert build_selector("cp39-macosx_arm64")
|
||||||
assert not build_selector("pp36-macosx_intel")
|
assert not build_selector("pp310-macosx_intel")
|
||||||
assert not build_selector("pp37-macosx_intel")
|
assert not build_selector("pp311-macosx_intel")
|
||||||
assert build_selector("cp36-win32")
|
assert build_selector("cp36-win32")
|
||||||
assert build_selector("cp37-win32")
|
assert build_selector("cp37-win32")
|
||||||
assert not build_selector("pp36-win32")
|
assert not build_selector("pp310-win32")
|
||||||
assert not build_selector("pp37-win32")
|
assert not build_selector("pp311-win32")
|
||||||
assert build_selector("cp36-win_amd64")
|
assert build_selector("cp36-win_amd64")
|
||||||
assert build_selector("cp37-win_amd64")
|
assert build_selector("cp37-win_amd64")
|
||||||
assert build_selector("cp310-win_amd64")
|
assert build_selector("cp310-win_amd64")
|
||||||
assert build_selector("cp311-win_amd64")
|
assert build_selector("cp311-win_amd64")
|
||||||
assert build_selector("cp312-win_amd64")
|
assert build_selector("cp312-win_amd64")
|
||||||
assert build_selector("cp313-win_amd64")
|
assert build_selector("cp313-win_amd64")
|
||||||
assert not build_selector("pp36-win_amd64")
|
assert not build_selector("pp310-win_amd64")
|
||||||
assert not build_selector("pp37-win_amd64")
|
assert not build_selector("pp311-win_amd64")
|
||||||
|
|
||||||
|
|
||||||
def test_build_filter_pre():
|
def test_build_filter_pre():
|
||||||
@@ -53,24 +53,59 @@ def test_build_filter_pre():
|
|||||||
assert not build_selector("cp313t-manylinux_x86_64")
|
assert not build_selector("cp313t-manylinux_x86_64")
|
||||||
|
|
||||||
|
|
||||||
|
def test_build_filter_pypy():
|
||||||
|
build_selector = BuildSelector(
|
||||||
|
build_config="*",
|
||||||
|
skip_config="",
|
||||||
|
enable=frozenset([EnableGroup.PyPy]),
|
||||||
|
)
|
||||||
|
assert build_selector("pp310-manylinux_x86_64")
|
||||||
|
assert build_selector("pp311-manylinux_x86_64")
|
||||||
|
assert not build_selector("pp38-manylinux_x86_64")
|
||||||
|
assert not build_selector("pp39-manylinux_x86_64")
|
||||||
|
|
||||||
|
|
||||||
|
def test_build_filter_pypy_eol():
|
||||||
|
build_selector = BuildSelector(
|
||||||
|
build_config="*",
|
||||||
|
skip_config="",
|
||||||
|
enable=frozenset([EnableGroup.PyPyEoL]),
|
||||||
|
)
|
||||||
|
assert not build_selector("pp310-manylinux_x86_64")
|
||||||
|
assert not build_selector("pp311-manylinux_x86_64")
|
||||||
|
assert build_selector("pp38-manylinux_x86_64")
|
||||||
|
assert build_selector("pp39-manylinux_x86_64")
|
||||||
|
|
||||||
|
|
||||||
|
def test_build_filter_pypy_all():
|
||||||
|
build_selector = BuildSelector(
|
||||||
|
build_config="*",
|
||||||
|
skip_config="",
|
||||||
|
enable=frozenset([EnableGroup.PyPyEoL, EnableGroup.PyPy]),
|
||||||
|
)
|
||||||
|
assert build_selector("pp310-manylinux_x86_64")
|
||||||
|
assert build_selector("pp311-manylinux_x86_64")
|
||||||
|
assert build_selector("pp38-manylinux_x86_64")
|
||||||
|
assert build_selector("pp39-manylinux_x86_64")
|
||||||
|
|
||||||
|
|
||||||
def test_skip():
|
def test_skip():
|
||||||
build_selector = BuildSelector(
|
build_selector = BuildSelector(
|
||||||
build_config="*",
|
build_config="*",
|
||||||
skip_config="pp36-* cp3?-manylinux_i686 cp36-win* *-win32",
|
skip_config="pp310-* cp3?-manylinux_i686 cp36-win* *-win32",
|
||||||
enable=frozenset([EnableGroup.PyPy]),
|
enable=frozenset([EnableGroup.PyPy]),
|
||||||
)
|
)
|
||||||
|
|
||||||
assert not build_selector("pp36-manylinux_x86_64")
|
assert not build_selector("pp310-manylinux_x86_64")
|
||||||
assert build_selector("pp37-manylinux_x86_64")
|
assert build_selector("pp311-manylinux_x86_64")
|
||||||
assert build_selector("pp38-manylinux_x86_64")
|
assert not build_selector("pp37-manylinux_i686")
|
||||||
assert build_selector("pp37-manylinux_i686")
|
assert not build_selector("pp38-manylinux_i686")
|
||||||
assert build_selector("pp38-manylinux_i686")
|
|
||||||
assert build_selector("cp36-manylinux_x86_64")
|
assert build_selector("cp36-manylinux_x86_64")
|
||||||
assert build_selector("cp37-manylinux_x86_64")
|
assert build_selector("cp37-manylinux_x86_64")
|
||||||
assert not build_selector("cp36-manylinux_i686")
|
assert not build_selector("cp36-manylinux_i686")
|
||||||
assert not build_selector("cp37-manylinux_i686")
|
assert not build_selector("cp37-manylinux_i686")
|
||||||
assert not build_selector("pp36-macosx_10_6_intel")
|
assert not build_selector("pp39-macosx_10_6_intel")
|
||||||
assert build_selector("pp37-macosx_10_6_intel")
|
assert build_selector("pp311-macosx_10_6_intel")
|
||||||
assert build_selector("cp36-macosx_10_6_intel")
|
assert build_selector("cp36-macosx_10_6_intel")
|
||||||
assert build_selector("cp37-macosx_10_6_intel")
|
assert build_selector("cp37-macosx_10_6_intel")
|
||||||
assert not build_selector("cp36-win32")
|
assert not build_selector("cp36-win32")
|
||||||
@@ -117,7 +152,7 @@ def test_build_limited_python():
|
|||||||
build_config="*",
|
build_config="*",
|
||||||
skip_config="",
|
skip_config="",
|
||||||
requires_python=SpecifierSet(">=3.7"),
|
requires_python=SpecifierSet(">=3.7"),
|
||||||
enable=frozenset([EnableGroup.PyPy]),
|
enable=frozenset([EnableGroup.PyPy, EnableGroup.PyPyEoL]),
|
||||||
)
|
)
|
||||||
|
|
||||||
assert not build_selector("cp36-manylinux_x86_64")
|
assert not build_selector("cp36-manylinux_x86_64")
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ def test_build_with_override_launches(monkeypatch, tmp_path):
|
|||||||
[tool.cibuildwheel]
|
[tool.cibuildwheel]
|
||||||
manylinux-x86_64-image = "manylinux_2_28"
|
manylinux-x86_64-image = "manylinux_2_28"
|
||||||
musllinux-x86_64-image = "musllinux_1_2"
|
musllinux-x86_64-image = "musllinux_1_2"
|
||||||
enable = ["pypy", "graalpy", "cpython-freethreading"]
|
enable = ["pypy", "pypy-eol", "graalpy", "cpython-freethreading"]
|
||||||
|
|
||||||
# Before Python 3.10, use manylinux2014
|
# Before Python 3.10, use manylinux2014
|
||||||
[[tool.cibuildwheel.overrides]]
|
[[tool.cibuildwheel.overrides]]
|
||||||
|
|||||||
Reference in New Issue
Block a user