diff --git a/noxfile.py b/noxfile.py index 381a01e09e..d625d47eae 100644 --- a/noxfile.py +++ b/noxfile.py @@ -4,7 +4,6 @@ import glob import os import shutil -import sys from contextlib import suppress from pathlib import Path from typing import Dict, List, Optional, Tuple @@ -34,6 +33,9 @@ "clang-format", ] +# Version of the cibuildwheel package used to build wheels. +cibuildwheel_version = "2.17.0" + # # Helpers for use within this file. # @@ -378,31 +380,16 @@ def release_build_bdist(session: nox.Session) -> None: """Build a binary distribution (wheels) on the current operating system.""" # Pin a version to ensure reproducible builds. - session.run("pip", "install", "cibuildwheel==2.15.0") - - # cibuildwheel only auto-detects the platform if it runs on a CI server. - # Do the auto-detect manually to enable local runs. - if sys.platform.startswith("linux"): - platform = "linux" - elif sys.platform == "darwin": - platform = "macos" - elif sys.platform == "win32": - platform = "windows" - else: - session.error(f"Unknown platform: {sys.platform!r}") + session.run("pip", "install", f"cibuildwheel=={cibuildwheel_version}") session.log("Building binary distribution (wheels)") session.run( "cibuildwheel", - "--platform", - platform, "--output-dir", dist_dir, ) - session.log( - f"Binary distribution in release mode for {platform!r} built into {dist_dir!r}" - ) + session.log(f"Binary distribution in release mode built into {dist_dir!r}") @nox.session