feat: add CPython 3.10 pre-release support (#675)
* Add CPython 3.10 support * Fix logger displaying CPython 3.1 instead of 3.10 * Fix tests failing with CPython 3.10 * Use pytest instead of nose * feat: --pre flag Apply suggestions from code review Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com> * fix: update Python update script to process beta versions * refactor: prerelease-pythons * Use `strtobool` to parse `CIBW_PRERELEASE_PYTHONS` env var * Update python version filtering for universal2 & arm64 * Filter out CPython 3.10 and above for `test_manylinuxXXXX_only[manylinux1]` test * Use CIBW_BUILD filtering rather than CIBW_SKIP for test_docker_images * Use skip_patterns to filter out pre-releases * Use `prerelease_pythons` instead of `pre` * Reword `CIBW_PRERELEASE_PYTHONS` doc per review. * Use `CIBW_PRERELEASE_PYTHONS: True` for usage example. * Update `cibuildwheel --help` doc * docs: add note on spec.filter * Clean up the BuildSelector __repr__ by refactoring * fix: remove platform variants for CIBW_PRERELEASE_PYTHONS * docs: mention the flag Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: Joe Rickerby <joerick@mac.com>
This commit is contained in:
co-authored by
Henry Schreiner
Joe Rickerby
parent
f294cab7aa
commit
5b22fc636b
+10
-5
@@ -24,13 +24,17 @@ else:
|
||||
raise Exception("Unsupported platform")
|
||||
|
||||
|
||||
def cibuildwheel_get_build_identifiers(project_path, env=None):
|
||||
def cibuildwheel_get_build_identifiers(project_path, env=None, *, prerelease_pythons=False):
|
||||
"""
|
||||
Returns the list of build identifiers that cibuildwheel will try to build
|
||||
for the current platform.
|
||||
"""
|
||||
cmd = [sys.executable, "-m", "cibuildwheel", "--print-build-identifiers", str(project_path)]
|
||||
if prerelease_pythons:
|
||||
cmd.append("--prerelease-pythons")
|
||||
|
||||
cmd_output = subprocess.run(
|
||||
[sys.executable, "-m", "cibuildwheel", "--print-build-identifiers", str(project_path)],
|
||||
cmd,
|
||||
universal_newlines=True,
|
||||
env=env,
|
||||
check=True,
|
||||
@@ -69,6 +73,7 @@ def cibuildwheel_run(project_path, package_dir=".", env=None, add_env=None, outp
|
||||
sys.executable,
|
||||
"-m",
|
||||
"cibuildwheel",
|
||||
"--prerelease-pythons",
|
||||
"--output-dir",
|
||||
str(output_dir or tmp_output_dir),
|
||||
str(package_dir),
|
||||
@@ -118,7 +123,7 @@ def expected_wheels(
|
||||
else:
|
||||
manylinux_versions = ["manylinux_2_17", "manylinux2014"]
|
||||
|
||||
python_abi_tags = ["cp36-cp36m", "cp37-cp37m", "cp38-cp38", "cp39-cp39"]
|
||||
python_abi_tags = ["cp36-cp36m", "cp37-cp37m", "cp38-cp38", "cp39-cp39", "cp310-cp310"]
|
||||
|
||||
if machine_arch in ["x86_64", "AMD64", "x86", "aarch64"]:
|
||||
python_abi_tags += ["pp37-pypy37_pp73"]
|
||||
@@ -129,8 +134,8 @@ def expected_wheels(
|
||||
python_abi_tags = [t for t in python_abi_tags if not t.startswith("pp")]
|
||||
|
||||
if platform == "macos" and machine_arch == "arm64":
|
||||
# currently, arm64 macs are only supported by cp39
|
||||
python_abi_tags = ["cp39-cp39"]
|
||||
# currently, arm64 macs are only supported by cp39 & cp310
|
||||
python_abi_tags = ["cp39-cp39", "cp310-cp310"]
|
||||
|
||||
wheels = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user