Skip to content

Commit c2e299e

Browse files
committed
Merge remote-tracking branch 'origin/main' into ci-label-flags
2 parents 512d9e4 + 99183d6 commit c2e299e

21 files changed

+132
-179
lines changed

.cirrus.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ windows_x86_task:
6262

6363
macos_arm64_task:
6464
macos_instance:
65-
image: ghcr.io/cirruslabs/macos-runner:sonoma
65+
image: ghcr.io/cirruslabs/macos-runner:sequoia
6666
env:
6767
VENV_ROOT: ${HOME}/venv-cibuildwheel
6868
PATH: ${VENV_ROOT}/bin:${PATH}
@@ -73,11 +73,11 @@ macos_arm64_task:
7373

7474
macos_arm64_cp38_task:
7575
macos_instance:
76-
image: ghcr.io/cirruslabs/macos-runner:sonoma
76+
image: ghcr.io/cirruslabs/macos-runner:sequoia
7777
env:
7878
VENV_ROOT: ${HOME}/venv-cibuildwheel
7979
PATH: ${VENV_ROOT}/bin:${PATH}
80-
PYTEST_ADDOPTS: --run-cp38-universal2 -k 'test_cp38_arm64_testing_universal2_installer or test_arch_auto'
80+
PYTEST_ADDOPTS: --run-cp38-universal2 -k 'test_cp38_arm64_testing_universal2_installer or test_arch_auto or test_dummy_serial'
8181
install_pre_requirements_script:
8282
- brew install [email protected]
8383
- python3.12 -m venv ${VENV_ROOT}

.github/workflows/test.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
runs-on: ${{ matrix.os }}
4242
strategy:
4343
matrix:
44-
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-15]
44+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-13, macos-15]
4545
python_version: ['3.13']
4646
include:
4747
- os: ubuntu-latest
@@ -89,7 +89,7 @@ jobs:
8989
9090
- name: Generate a sample project
9191
run: |
92-
uv run -m test.test_projects test.test_0_basic.basic_project sample_proj
92+
uv run --no-sync -m test.test_projects test.test_0_basic.basic_project sample_proj
9393
9494
- name: Run a sample build (GitHub Action)
9595
uses: ./
@@ -141,7 +141,7 @@ jobs:
141141

142142
- name: Test cibuildwheel
143143
run: |
144-
uv run bin/run_tests.py ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }}
144+
uv run --no-sync bin/run_tests.py ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }}
145145
146146
emulated-archs:
147147
name: Get qemu emulated architectures
@@ -160,7 +160,7 @@ jobs:
160160
- name: Get qemu emulated architectures
161161
id: archs
162162
run: |
163-
OUTPUT=$(uv run python -c "from json import dumps; from test.utils import EMULATED_ARCHS; print(dumps(EMULATED_ARCHS))")
163+
OUTPUT=$(uv run --no-sync python -c "from json import dumps; from test.utils import EMULATED_ARCHS; print(dumps(EMULATED_ARCHS))")
164164
echo "${OUTPUT}"
165165
echo "archs=${OUTPUT}" >> "$GITHUB_OUTPUT"
166166
@@ -185,7 +185,7 @@ jobs:
185185
uses: docker/setup-qemu-action@v3
186186

187187
- name: Run the emulation tests
188-
run: uv run pytest --run-emulation ${{ matrix.arch }} test/test_emulation.py
188+
run: uv run --no-sync pytest --run-emulation ${{ matrix.arch }} test/test_emulation.py
189189

190190
test-pyodide:
191191
name: Test cibuildwheel building Pyodide wheels
@@ -205,7 +205,7 @@ jobs:
205205

206206
- name: Generate a sample project
207207
run: |
208-
uv run -m test.test_projects test.test_0_basic.basic_project sample_proj
208+
uv run --no-sync -m test.test_projects test.test_0_basic.basic_project sample_proj
209209
210210
- name: Run a sample build (GitHub Action)
211211
uses: ./
@@ -217,6 +217,6 @@ jobs:
217217

218218
- name: Run tests with 'CIBW_PLATFORM' set to 'pyodide'
219219
run: |
220-
uv run ./bin/run_tests.py
220+
uv run --no-sync ./bin/run_tests.py
221221
env:
222222
CIBW_PLATFORM: pyodide

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repos:
1414
- id: trailing-whitespace
1515

1616
- repo: https://github.com/astral-sh/ruff-pre-commit
17-
rev: v0.11.4
17+
rev: v0.11.5
1818
hooks:
1919
- id: ruff
2020
args: ["--fix", "--show-fixes"]
@@ -81,7 +81,7 @@ repos:
8181

8282

8383
- repo: https://github.com/python-jsonschema/check-jsonschema
84-
rev: 0.32.1
84+
rev: 0.33.0
8585
hooks:
8686
- id: check-dependabot
8787
- id: check-github-actions

cibuildwheel/platforms/macos.py

+15-53
Original file line numberDiff line numberDiff line change
@@ -241,25 +241,6 @@ def setup_python(
241241
# we version pip ourselves, so we don't care about pip version checking
242242
env["PIP_DISABLE_PIP_VERSION_CHECK"] = "1"
243243

244-
# upgrade pip to the version matching our constraints
245-
# if necessary, reinstall it to ensure that it's available on PATH as 'pip'
246-
if build_frontend == "build[uv]":
247-
assert uv_path is not None
248-
pip = [str(uv_path), "pip"]
249-
else:
250-
pip = ["python", "-m", "pip"]
251-
252-
if not use_uv:
253-
call(
254-
*pip,
255-
"install",
256-
"--upgrade",
257-
"pip",
258-
*constraint_flags(dependency_constraint),
259-
env=env,
260-
cwd=venv_path,
261-
)
262-
263244
# Apply our environment after pip is ready
264245
env = environment.as_dictionary(prev_environment=env)
265246

@@ -434,8 +415,7 @@ def build(options: Options, tmp_path: Path) -> None:
434415
build_options.environment,
435416
build_frontend.name,
436417
)
437-
if not use_uv:
438-
pip_version = get_pip_version(env)
418+
pip_version = None if use_uv else get_pip_version(env)
439419

440420
compatible_wheel = find_compatible_wheel(built_wheels, config.identifier)
441421
if compatible_wheel:
@@ -460,7 +440,7 @@ def build(options: Options, tmp_path: Path) -> None:
460440
)
461441

462442
build_env = env.copy()
463-
if not use_uv:
443+
if pip_version is not None:
464444
build_env["VIRTUALENV_PIP"] = pip_version
465445
if constraints_path:
466446
combine_constraints(
@@ -614,19 +594,6 @@ def build(options: Options, tmp_path: Path) -> None:
614594
else f"Testing wheel on {testing_arch}..."
615595
)
616596

617-
# set up a virtual environment to install and test from, to make sure
618-
# there are no dependencies that were pulled in at build time.
619-
if not use_uv:
620-
call(
621-
"pip",
622-
"install",
623-
"virtualenv",
624-
*constraint_flags(constraints_path),
625-
env=env,
626-
)
627-
628-
venv_dir = identifier_tmp_dir / f"venv-test-{testing_arch}"
629-
630597
arch_prefix = []
631598
uv_arch_args = []
632599
if testing_arch != machine_arch:
@@ -642,29 +609,24 @@ def build(options: Options, tmp_path: Path) -> None:
642609
call_with_arch = functools.partial(call, *arch_prefix)
643610
shell_with_arch = functools.partial(call, *arch_prefix, "/bin/sh", "-c")
644611

612+
# set up a virtual environment to install and test from, to make sure
613+
# there are no dependencies that were pulled in at build time.
614+
venv_dir = identifier_tmp_dir / f"venv-test-{testing_arch}"
615+
virtualenv_env = virtualenv(
616+
config.version,
617+
base_python,
618+
venv_dir,
619+
None,
620+
use_uv=use_uv,
621+
env=env,
622+
pip_version=pip_version,
623+
)
645624
if use_uv:
646625
pip_install = functools.partial(call, *pip, "install", *uv_arch_args)
647-
call("uv", "venv", venv_dir, f"--python={base_python}", env=env)
648626
else:
649627
pip_install = functools.partial(call_with_arch, *pip, "install")
650-
# Use pip version from the initial env to ensure determinism
651-
venv_args = [
652-
"--no-periodic-update",
653-
f"--pip={pip_version}",
654-
"--no-setuptools",
655-
"--no-wheel",
656-
]
657-
call_with_arch("python", "-m", "virtualenv", *venv_args, venv_dir, env=env)
658-
659-
virtualenv_env = env.copy()
628+
660629
virtualenv_env["MACOSX_DEPLOYMENT_TARGET"] = get_test_macosx_deployment_target()
661-
virtualenv_env["PATH"] = os.pathsep.join(
662-
[
663-
str(venv_dir / "bin"),
664-
virtualenv_env["PATH"],
665-
]
666-
)
667-
virtualenv_env["VIRTUAL_ENV"] = str(venv_dir)
668630

669631
# check that we are using the Python from the virtual environment
670632
call_with_arch("which", "python", env=virtualenv_env)

cibuildwheel/platforms/windows.py

+10-43
Original file line numberDiff line numberDiff line change
@@ -265,21 +265,6 @@ def setup_python(
265265
env["PYTHON_ARCH"] = python_configuration.arch
266266
env["PIP_DISABLE_PIP_VERSION_CHECK"] = "1"
267267

268-
# upgrade pip to the version matching our constraints
269-
# if necessary, reinstall it to ensure that it's available on PATH as 'pip.exe'
270-
if not use_uv:
271-
call(
272-
"python",
273-
"-m",
274-
"pip",
275-
"install",
276-
"--upgrade",
277-
"pip",
278-
*constraint_flags(dependency_constraint),
279-
env=env,
280-
cwd=venv_path,
281-
)
282-
283268
# update env with results from CIBW_ENVIRONMENT
284269
env = environment.as_dictionary(prev_environment=env)
285270

@@ -378,8 +363,7 @@ def build(options: Options, tmp_path: Path) -> None:
378363
build_options.environment,
379364
build_frontend.name,
380365
)
381-
if not use_uv:
382-
pip_version = get_pip_version(env)
366+
pip_version = None if use_uv else get_pip_version(env)
383367

384368
compatible_wheel = find_compatible_wheel(built_wheels, config.identifier)
385369
if compatible_wheel:
@@ -407,7 +391,7 @@ def build(options: Options, tmp_path: Path) -> None:
407391
)
408392

409393
build_env = env.copy()
410-
if not use_uv:
394+
if pip_version is not None:
411395
build_env["VIRTUALENV_PIP"] = pip_version
412396

413397
if constraints_path:
@@ -486,33 +470,16 @@ def build(options: Options, tmp_path: Path) -> None:
486470
log.step("Testing wheel...")
487471
# set up a virtual environment to install and test from, to make sure
488472
# there are no dependencies that were pulled in at build time.
489-
if not use_uv:
490-
call(
491-
"pip", "install", "virtualenv", *constraint_flags(constraints_path), env=env
492-
)
493-
494473
venv_dir = identifier_tmp_dir / "venv-test"
495-
496-
if use_uv:
497-
call("uv", "venv", venv_dir, f"--python={base_python}", env=env)
498-
else:
499-
# Use pip version from the initial env to ensure determinism
500-
venv_args = [
501-
"--no-periodic-update",
502-
f"--pip={pip_version}",
503-
"--no-setuptools",
504-
"--no-wheel",
505-
]
506-
call("python", "-m", "virtualenv", *venv_args, venv_dir, env=env)
507-
508-
virtualenv_env = env.copy()
509-
virtualenv_env["PATH"] = os.pathsep.join(
510-
[
511-
str(venv_dir / "Scripts"),
512-
virtualenv_env["PATH"],
513-
]
474+
virtualenv_env = virtualenv(
475+
config.version,
476+
base_python,
477+
venv_dir,
478+
None,
479+
use_uv=use_uv,
480+
env=env,
481+
pip_version=pip_version,
514482
)
515-
virtualenv_env["VIRTUAL_ENV"] = str(venv_dir)
516483

517484
# check that we are using the Python from the virtual environment
518485
call("where", "python", env=virtualenv_env)

cibuildwheel/resources/build-platforms.toml

+18-18
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ python_configurations = [
112112
{ identifier = "cp311-macosx_x86_64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.9/python-3.11.9-macos11.pkg" },
113113
{ identifier = "cp311-macosx_arm64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.9/python-3.11.9-macos11.pkg" },
114114
{ identifier = "cp311-macosx_universal2", version = "3.11", url = "https://www.python.org/ftp/python/3.11.9/python-3.11.9-macos11.pkg" },
115-
{ identifier = "cp312-macosx_x86_64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.9/python-3.12.9-macos11.pkg" },
116-
{ identifier = "cp312-macosx_arm64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.9/python-3.12.9-macos11.pkg" },
117-
{ identifier = "cp312-macosx_universal2", version = "3.12", url = "https://www.python.org/ftp/python/3.12.9/python-3.12.9-macos11.pkg" },
118-
{ identifier = "cp313-macosx_x86_64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.2/python-3.13.2-macos11.pkg" },
119-
{ identifier = "cp313-macosx_arm64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.2/python-3.13.2-macos11.pkg" },
120-
{ identifier = "cp313-macosx_universal2", version = "3.13", url = "https://www.python.org/ftp/python/3.13.2/python-3.13.2-macos11.pkg" },
121-
{ identifier = "cp313t-macosx_x86_64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.2/python-3.13.2-macos11.pkg" },
122-
{ identifier = "cp313t-macosx_arm64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.2/python-3.13.2-macos11.pkg" },
123-
{ identifier = "cp313t-macosx_universal2", version = "3.13", url = "https://www.python.org/ftp/python/3.13.2/python-3.13.2-macos11.pkg" },
115+
{ identifier = "cp312-macosx_x86_64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.10/python-3.12.10-macos11.pkg" },
116+
{ identifier = "cp312-macosx_arm64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.10/python-3.12.10-macos11.pkg" },
117+
{ identifier = "cp312-macosx_universal2", version = "3.12", url = "https://www.python.org/ftp/python/3.12.10/python-3.12.10-macos11.pkg" },
118+
{ identifier = "cp313-macosx_x86_64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.3/python-3.13.3-macos11.pkg" },
119+
{ identifier = "cp313-macosx_arm64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.3/python-3.13.3-macos11.pkg" },
120+
{ identifier = "cp313-macosx_universal2", version = "3.13", url = "https://www.python.org/ftp/python/3.13.3/python-3.13.3-macos11.pkg" },
121+
{ identifier = "cp313t-macosx_x86_64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.3/python-3.13.3-macos11.pkg" },
122+
{ identifier = "cp313t-macosx_arm64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.3/python-3.13.3-macos11.pkg" },
123+
{ identifier = "cp313t-macosx_universal2", version = "3.13", url = "https://www.python.org/ftp/python/3.13.3/python-3.13.3-macos11.pkg" },
124124
{ identifier = "pp38-macosx_x86_64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_x86_64.tar.bz2" },
125125
{ identifier = "pp38-macosx_arm64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_arm64.tar.bz2" },
126126
{ identifier = "pp39-macosx_x86_64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.16-macos_x86_64.tar.bz2" },
@@ -141,18 +141,18 @@ python_configurations = [
141141
{ identifier = "cp310-win_amd64", version = "3.10.11", arch = "64" },
142142
{ identifier = "cp311-win32", version = "3.11.9", arch = "32" },
143143
{ identifier = "cp311-win_amd64", version = "3.11.9", arch = "64" },
144-
{ identifier = "cp312-win32", version = "3.12.9", arch = "32" },
145-
{ identifier = "cp312-win_amd64", version = "3.12.9", arch = "64" },
146-
{ identifier = "cp313-win32", version = "3.13.2", arch = "32" },
147-
{ identifier = "cp313t-win32", version = "3.13.2", arch = "32" },
148-
{ identifier = "cp313-win_amd64", version = "3.13.2", arch = "64" },
149-
{ identifier = "cp313t-win_amd64", version = "3.13.2", arch = "64" },
144+
{ identifier = "cp312-win32", version = "3.12.10", arch = "32" },
145+
{ identifier = "cp312-win_amd64", version = "3.12.10", arch = "64" },
146+
{ identifier = "cp313-win32", version = "3.13.3", arch = "32" },
147+
{ identifier = "cp313t-win32", version = "3.13.3", arch = "32" },
148+
{ identifier = "cp313-win_amd64", version = "3.13.3", arch = "64" },
149+
{ identifier = "cp313t-win_amd64", version = "3.13.3", arch = "64" },
150150
{ identifier = "cp39-win_arm64", version = "3.9.10", arch = "ARM64" },
151151
{ identifier = "cp310-win_arm64", version = "3.10.11", arch = "ARM64" },
152152
{ identifier = "cp311-win_arm64", version = "3.11.9", arch = "ARM64" },
153-
{ identifier = "cp312-win_arm64", version = "3.12.9", arch = "ARM64" },
154-
{ identifier = "cp313-win_arm64", version = "3.13.2", arch = "ARM64" },
155-
{ identifier = "cp313t-win_arm64", version = "3.13.2", arch = "ARM64" },
153+
{ identifier = "cp312-win_arm64", version = "3.12.10", arch = "ARM64" },
154+
{ identifier = "cp313-win_arm64", version = "3.13.3", arch = "ARM64" },
155+
{ identifier = "cp313t-win_arm64", version = "3.13.3", arch = "ARM64" },
156156
{ identifier = "pp38-win_amd64", version = "3.8", arch = "64", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-win64.zip" },
157157
{ identifier = "pp39-win_amd64", version = "3.9", arch = "64", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.16-win64.zip" },
158158
{ identifier = "pp310-win_amd64", version = "3.10", arch = "64", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.19-win64.zip" },

cibuildwheel/resources/constraints-pyodide312.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ filelock==3.18.0
2727
# via virtualenv
2828
h11==0.14.0
2929
# via httpcore
30-
httpcore==1.0.7
30+
httpcore==1.0.8
3131
# via httpx
3232
httpx==0.28.1
3333
# via unearth
@@ -52,7 +52,7 @@ pip==25.0.1
5252
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
5353
platformdirs==4.3.7
5454
# via virtualenv
55-
pydantic==2.11.2
55+
pydantic==2.11.3
5656
# via
5757
# pyodide-build
5858
# pyodide-lock
@@ -92,7 +92,7 @@ typer==0.15.2
9292
# auditwheel-emscripten
9393
# pyodide-build
9494
# pyodide-cli
95-
typing-extensions==4.13.1
95+
typing-extensions==4.13.2
9696
# via
9797
# anyio
9898
# pydantic
@@ -101,9 +101,9 @@ typing-extensions==4.13.1
101101
# typing-inspection
102102
typing-inspection==0.4.0
103103
# via pydantic
104-
unearth==0.17.3
104+
unearth==0.17.5
105105
# via pyodide-build
106-
urllib3==2.3.0
106+
urllib3==2.4.0
107107
# via requests
108108
virtualenv==20.30.0
109109
# via

cibuildwheel/resources/constraints-python310.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pyproject-hooks==1.2.0
2626
# via build
2727
tomli==2.2.1
2828
# via build
29-
typing-extensions==4.13.1
29+
typing-extensions==4.13.2
3030
# via delocate
3131
virtualenv==20.30.0
3232
# via -r cibuildwheel/resources/constraints.in

0 commit comments

Comments
 (0)