2020 CAN_USE_ABI3 = IS_CPYTHON and not Py_GIL_DISABLED
2121 cmdclass = {}
2222 extension_kwargs = {}
23- if CAN_USE_ABI3 and sys.version_info[:2] >= (3, 8 ):
23+ if CAN_USE_ABI3 and sys.version_info[:2] >= (3, 10 ):
2424 from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
2525
2626 class bdist_wheel_abi3(_bdist_wheel):
@@ -33,7 +33,7 @@ def get_tag(self):
3333 return python, "abi3", plat
3434
3535 cmdclass["bdist_wheel"] = bdist_wheel_abi3
36- extension_kwargs["define_macros"] = [("Py_LIMITED_API", "0x03080000 ")]
36+ extension_kwargs["define_macros"] = [("Py_LIMITED_API", "0x030A0000 ")]
3737 extension_kwargs["py_limited_api"] = True
3838 """
3939 ),
@@ -53,17 +53,16 @@ def test_abi3(tmp_path):
5353 project_dir ,
5454 add_env = {
5555 # free_threaded and PyPy do not have a Py_LIMITED_API equivalent, just build one of those
56- "CIBW_BUILD" : "cp3?-* cp31?-* cp313t-* pp310-*"
56+ # also limit the number of builds for test performance reasons
57+ "CIBW_BUILD" : "cp39-* cp310-* pp310-* cp311-* cp313t-*"
5758 },
5859 )
5960
6061 # check that the expected wheels are produced
6162 expected_wheels = [
62- w .replace ("cp38-cp38 " , "cp38 -abi3" )
63+ w .replace ("cp310-cp310 " , "cp310 -abi3" )
6364 for w in utils .expected_wheels ("spam" , "0.1.0" )
64- if ("-pp310" in w or "-pp" not in w )
65- and "-cp39" not in w
66- and ("-cp313t" in w or "-cp31" not in w )
65+ if "-cp39" in w or "-cp310" in w or "-pp310" in w or "-cp313t" in w
6766 ]
6867 assert set (actual_wheels ) == set (expected_wheels )
6968
0 commit comments