Skip to content

Commit 40c79f8

Browse files
committed
chore: use SPEC 0 schedule for cibuildwheel
1 parent df6f886 commit 40c79f8

32 files changed

+114
-160
lines changed

.cirrus.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ only_if: changesInclude('.cirrus.yml') || ($CIRRUS_BRANCH == "main" && !changesI
22

33
run_tests: &RUN_TESTS
44
install_cibuildwheel_script:
5+
- python -V
56
- python -m pip install -e ".[dev]" pytest-custom-exit-code
67
run_cibuildwheel_tests_script:
78
- python ./bin/run_tests.py
89

9-
1010
linux_x86_task:
1111
timeout_in: 120m
1212
compute_engine_instance:
@@ -15,10 +15,15 @@ linux_x86_task:
1515
platform: linux
1616
cpu: 8
1717
memory: 8G
18-
18+
env:
19+
VENV_ROOT: ${HOME}/venv-cibuildwheel
20+
PATH: ${VENV_ROOT}/bin:${PATH}
1921
install_pre_requirements_script:
2022
- docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all
21-
- apt install -y python3-venv python-is-python3
23+
- add-apt-repository -y ppa:deadsnakes/ppa
24+
- apt-get update
25+
- apt-get install -y python3.12-venv
26+
- python3.12 -m venv ${VENV_ROOT}
2227
<<: *RUN_TESTS
2328

2429
linux_aarch64_task:
@@ -29,10 +34,15 @@ linux_aarch64_task:
2934
platform: linux
3035
cpu: 4
3136
memory: 4G
32-
37+
env:
38+
VENV_ROOT: ${HOME}/venv-cibuildwheel
39+
PATH: ${VENV_ROOT}/bin:${PATH}
3340
install_pre_requirements_script:
3441
- docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all
35-
- apt install -y python3-venv python-is-python3
42+
- add-apt-repository -y ppa:deadsnakes/ppa
43+
- apt-get update
44+
- apt-get install -y python3.12-venv
45+
- python3.12 -m venv ${VENV_ROOT}
3646
<<: *RUN_TESTS
3747

3848
windows_x86_task:
@@ -45,30 +55,32 @@ windows_x86_task:
4555
memory: 8G
4656

4757
install_pre_requirements_script:
48-
- choco install -y --no-progress python3 --version 3.10.6
58+
- choco install -y --no-progress python3 --version 3.12.4
4959
- refreshenv
5060
- echo PATH=%PATH% >> "%CIRRUS_ENV%"
5161
<<: *RUN_TESTS
5262

5363
macos_arm64_task:
5464
macos_instance:
5565
image: ghcr.io/cirruslabs/macos-sonoma-xcode
56-
5766
env:
58-
PATH: /opt/homebrew/opt/[email protected]/libexec/bin:$PATH
67+
VENV_ROOT: ${HOME}/venv-cibuildwheel
68+
PATH: ${VENV_ROOT}/bin:${PATH}
5969
install_pre_requirements_script:
60-
- brew install [email protected]
70+
- brew install [email protected]
71+
- python3.12 -m venv ${VENV_ROOT}
6172
<<: *RUN_TESTS
6273

6374
macos_arm64_cp38_task:
6475
macos_instance:
6576
image: ghcr.io/cirruslabs/macos-sonoma-xcode
66-
6777
env:
68-
PATH: /opt/homebrew/opt/[email protected]/libexec/bin:$PATH
78+
VENV_ROOT: ${HOME}/venv-cibuildwheel
79+
PATH: ${VENV_ROOT}/bin:${PATH}
6980
PYTEST_ADDOPTS: --run-cp38-universal2 -k 'test_cp38_arm64_testing_universal2_installer or test_arch_auto'
7081
install_pre_requirements_script:
71-
- brew install [email protected]
82+
- brew install [email protected]
83+
- python3.12 -m venv ${VENV_ROOT}
7284
- curl -fsSLO https://www.python.org/ftp/python/3.8.10/python-3.8.10-macos11.pkg
7385
- sudo installer -pkg python-3.8.10-macos11.pkg -target /
7486
- rm python-3.8.10-macos11.pkg

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
python_version: ['3.13']
4242
include:
4343
- os: ubuntu-latest
44-
python_version: '3.8'
44+
python_version: '3.11'
4545
timeout-minutes: 180
4646
steps:
4747
- uses: actions/checkout@v4
@@ -67,7 +67,7 @@ jobs:
6767

6868
- name: Install dependencies
6969
run: |
70-
uv pip install --system ".[test]"
70+
uv pip install --system --python ${{ matrix.python_version }} ".[test]"
7171
7272
- name: Generate a sample project
7373
run: |

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ repos:
2424
rev: v1.13.0
2525
hooks:
2626
- id: mypy
27-
name: mypy 3.8 on cibuildwheel/
27+
name: mypy 3.11 on cibuildwheel/
2828
exclude: ^cibuildwheel/resources/.*py|bin/generate_schema.py$
29-
args: ["--python-version=3.8"]
29+
args: ["--python-version=3.11"]
3030
additional_dependencies: &mypy-dependencies
3131
- bracex
3232
- dependency-groups>=1.2
@@ -47,9 +47,9 @@ repos:
4747
- uv
4848
- validate-pyproject
4949
- id: mypy
50-
name: mypy 3.12
50+
name: mypy 3.13
5151
exclude: ^cibuildwheel/resources/.*py$
52-
args: ["--python-version=3.12"]
52+
args: ["--python-version=3.13"]
5353
additional_dependencies: *mypy-dependencies
5454

5555
- repo: https://github.com/shellcheck-py/shellcheck-py

.travis.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ branches:
88

99
jobs:
1010
include:
11-
- name: Linux | x86_64 + i686 | Python 3.9
12-
python: 3.9
11+
- name: Linux | x86_64 + i686 | Python 3.11
12+
python: 3.11
1313
services: docker
1414
env: PYTHON=python
1515

16-
- name: Linux | arm64 | Python 3.9
17-
python: 3.9
16+
- name: Linux | arm64 | Python 3.11
17+
python: 3.11
1818
services: docker
1919
arch: arm64-graviton2
2020
group: edge
@@ -29,8 +29,8 @@ jobs:
2929
packages:
3030
- docker-ce docker-ce-cli containerd.io
3131

32-
- name: Linux | ppc64le | Python 3.9
33-
python: 3.9
32+
- name: Linux | ppc64le | Python 3.11
33+
python: 3.11
3434
services: docker
3535
arch: ppc64le
3636
allow_failure: True
@@ -40,16 +40,16 @@ jobs:
4040
# c.f. https://travis-ci.community/t/running-out-of-disk-space-quota-when-using-docker-on-ppc64le/11634
4141
- PYTEST_ADDOPTS='-k "not test_manylinuxXXXX_only"'
4242

43-
- name: Windows | x86_64 | Python 3.9
43+
- name: Windows | x86_64 | Python 3.11
4444
os: windows
4545
language: shell
4646
before_install:
47-
- choco upgrade python3 -y --version 3.9.13 --limit-output --params "/InstallDir:C:\\Python39"
47+
- choco upgrade python3 -y --version 3.11.9 --limit-output --params "/InstallDir:C:\\Python311"
4848
env:
49-
- PYTHON=C:\\Python39\\python
49+
- PYTHON=C:\\Python311\\python
5050

51-
- name: Linux | s390x | Python 3.9
52-
python: 3.9
51+
- name: Linux | s390x | Python 3.11
52+
python: 3.11
5353
services: docker
5454
arch: s390x
5555
allow_failure: True

CI.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
This is a summary of the host Python versions and platforms covered by the different CI platforms:
22

3-
| | 3.8 | 3.9 | 3.10 | 3.11 | 3.12 |
4-
|---------|----------------------------------|-----------|-----------|---------|--------------------------------------------------|
5-
| Linux | Azure Pipelines / GitHub Actions | Travis CI | Cirrus CI | | AppVeyor¹ / CircleCI¹ / GitHub Actions / GitLab¹ |
6-
| macOS | Azure Pipelines | | Cirrus CI | GitLab¹ | AppVeyor¹ /CircleCI¹ / GitHub Actions |
7-
| Windows | Azure Pipelines | Travis CI | Cirrus CI | | AppVeyor¹ / GitHub Actions / GitLab¹ |
3+
| | 3.11 | 3.12 | 3.13 |
4+
|---------|----------------------------------------------|---------------------------------------------|----------------|
5+
| Linux | Azure Pipelines / GitHub Actions / Travis CI | AppVeyor¹ / CircleCI¹ / Cirrus CI / GitLab¹ | GitHub Actions |
6+
| macOS | Azure Pipelines / GitLab¹ | AppVeyor¹ / CircleCI¹ / Cirrus CI / GitLab¹ | GitHub Actions |
7+
| Windows | Azure Pipelines / Travis CI | AppVeyor¹ / Cirrus CI / GitLab¹ | GitHub Actions |
88

99
> ¹ Runs a reduced set of tests to reduce CI load
1010
11-
Non-x86 architectures are covered on Travis CI using Python 3.9.
11+
Non-x86 architectures are covered on Travis CI using Python 3.11.

azure-pipelines.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,35 @@ pr:
55
- .pre-commit-config.yaml
66

77
jobs:
8-
- job: linux_38
8+
- job: linux_311
99
timeoutInMinutes: 120
1010
pool: {vmImage: 'Ubuntu-20.04'}
1111
steps:
1212
- task: UsePythonVersion@0
1313
inputs:
14-
versionSpec: '3.8'
14+
versionSpec: '3.11'
1515
- bash: |
1616
docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all
1717
python -m pip install -e ".[dev]"
1818
python ./bin/run_tests.py
1919
20-
- job: macos_38
20+
- job: macos_311
2121
pool: {vmImage: 'macOS-12'}
2222
steps:
2323
- task: UsePythonVersion@0
2424
inputs:
25-
versionSpec: '3.8'
25+
versionSpec: '3.11'
2626
- bash: |
2727
python -m pip install -e ".[dev]"
2828
python ./bin/run_tests.py --num-processes 2
2929
30-
- job: windows_38
30+
- job: windows_311
3131
pool: {vmImage: 'windows-2019'}
3232
timeoutInMinutes: 180
3333
steps:
3434
- task: UsePythonVersion@0
3535
inputs:
36-
versionSpec: '3.8'
36+
versionSpec: '3.11'
3737
- bash: |
3838
python -m pip install -e ".[dev]"
3939
python ./bin/run_tests.py

bin/bump_version.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@
1111
import os
1212
import subprocess
1313
import sys
14+
import tomllib
1415
import urllib.parse
1516
from pathlib import Path
1617

1718
import click
1819
from packaging.version import InvalidVersion, Version
1920

20-
if sys.version_info < (3, 11):
21-
import tomli as tomllib
22-
else:
23-
import tomllib
24-
2521
config = [
2622
# file path, version find/replace format
2723
("pyproject.toml", 'version = "{}"'),

bin/update_nodejs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import difflib
66
import logging
7+
import tomllib
78
from dataclasses import dataclass
89
from pathlib import Path
910
from typing import Final
@@ -16,8 +17,6 @@
1617
from rich.logging import RichHandler
1718
from rich.syntax import Syntax
1819

19-
from cibuildwheel._compat import tomllib
20-
2120
log = logging.getLogger("cibw")
2221

2322
# Looking up the dir instead of using utils.resources_dir

bin/update_pythons.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
import copy
66
import difflib
77
import logging
8+
import tomllib
89
from collections.abc import Mapping, MutableMapping
910
from pathlib import Path
10-
from typing import Any, Final, Literal, TypedDict, Union
11+
from typing import Any, Final, Literal, TypedDict
1112

1213
import click
1314
import requests
@@ -17,7 +18,6 @@
1718
from rich.logging import RichHandler
1819
from rich.syntax import Syntax
1920

20-
from cibuildwheel._compat import tomllib
2121
from cibuildwheel.extra import dump_python_configurations
2222

2323
log = logging.getLogger("cibw")
@@ -50,7 +50,7 @@ class ConfigMacOS(TypedDict):
5050
url: str
5151

5252

53-
AnyConfig = Union[ConfigWinCP, ConfigWinPP, ConfigMacOS]
53+
AnyConfig = ConfigWinCP | ConfigWinPP | ConfigMacOS
5454

5555

5656
# The following set of "Versions" classes allow the initial call to the APIs to

bin/update_virtualenv.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import difflib
66
import logging
77
import subprocess
8+
import tomllib
89
from dataclasses import dataclass
910
from pathlib import Path
1011
from typing import Final
@@ -15,8 +16,6 @@
1516
from rich.logging import RichHandler
1617
from rich.syntax import Syntax
1718

18-
from cibuildwheel._compat import tomllib
19-
2019
log = logging.getLogger("cibw")
2120

2221
# Looking up the dir instead of using utils.resources_dir

cibuildwheel/__main__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import argparse
4+
import contextlib
45
import dataclasses
56
import os
67
import shutil
@@ -12,7 +13,7 @@
1213
from collections.abc import Iterable, Sequence, Set
1314
from pathlib import Path
1415
from tempfile import mkdtemp
15-
from typing import Protocol
16+
from typing import Protocol, assert_never
1617

1718
import cibuildwheel
1819
import cibuildwheel.linux
@@ -21,7 +22,6 @@
2122
import cibuildwheel.util
2223
import cibuildwheel.windows
2324
from cibuildwheel import errors
24-
from cibuildwheel._compat.typing import assert_never
2525
from cibuildwheel.architecture import Architecture, allowed_architectures_check
2626
from cibuildwheel.logger import log
2727
from cibuildwheel.options import CommandLineArguments, Options, compute_options
@@ -31,7 +31,6 @@
3131
BuildSelector,
3232
CIProvider,
3333
Unbuffered,
34-
chdir,
3534
detect_ci_provider,
3635
fix_ansi_codes_for_github_actions,
3736
strtobool,
@@ -200,7 +199,7 @@ def main_inner(global_options: GlobalOptions) -> None:
200199
# This is now the new package dir
201200
args.package_dir = project_dir.resolve()
202201

203-
with chdir(project_dir):
202+
with contextlib.chdir(project_dir):
204203
build_in_directory(args)
205204
finally:
206205
# avoid https://github.com/python/cpython/issues/86962 by performing

cibuildwheel/_compat/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

cibuildwheel/_compat/tomllib.py

Lines changed: 0 additions & 10 deletions
This file was deleted.

cibuildwheel/_compat/typing.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)