From 98fedb7e5142c9d4f591c65dffb6b21a276fb67c Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 28 Apr 2022 09:19:27 -0400 Subject: [PATCH 1/8] refactor: use dataclasses vs. NamedTuples --- .pre-commit-config.yaml | 4 ++-- bin/update_docker.py | 5 +++-- bin/update_virtualenv.py | 5 +++-- cibuildwheel/__main__.py | 2 +- cibuildwheel/bashlex_eval.py | 6 ++++-- cibuildwheel/linux.py | 9 ++++++--- cibuildwheel/macos.py | 6 ++++-- cibuildwheel/options.py | 31 +++++++++++++------------------ cibuildwheel/util.py | 19 ++++++++++--------- cibuildwheel/windows.py | 6 ++++-- unit_test/utils.py | 20 ++++++++++---------- 11 files changed, 60 insertions(+), 53 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c64525ee..da8b94a2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,7 +27,7 @@ repos: # Autoremoves unused imports - repo: https://github.com/hadialqattan/pycln - rev: v1.3.1 + rev: v1.3.2 hooks: - id: pycln args: [--all] @@ -49,7 +49,7 @@ repos: - id: setup-cfg-fmt - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.942 + rev: v0.950 hooks: - id: mypy name: mypy 3.6 on cibuildwheel/ diff --git a/bin/update_docker.py b/bin/update_docker.py index 73da5a1b..105a3267 100755 --- a/bin/update_docker.py +++ b/bin/update_docker.py @@ -2,8 +2,8 @@ from __future__ import annotations import configparser +from dataclasses import dataclass from pathlib import Path -from typing import NamedTuple import requests @@ -11,7 +11,8 @@ DIR = Path(__file__).parent.resolve() RESOURCES = DIR.parent / "cibuildwheel/resources" -class Image(NamedTuple): +@dataclass(frozen=True) +class Image: manylinux_version: str platform: str image_name: str diff --git a/bin/update_virtualenv.py b/bin/update_virtualenv.py index 2e67007e..8dd9c5ef 100755 --- a/bin/update_virtualenv.py +++ b/bin/update_virtualenv.py @@ -6,8 +6,8 @@ import difflib import logging import subprocess import sys +from dataclasses import dataclass from pathlib import Path -from typing import NamedTuple import click import rich @@ -36,7 +36,8 @@ GET_VIRTUALENV_URL_TEMPLATE: Final[ ] = f"{GET_VIRTUALENV_GITHUB}/blob/{{version}}/public/virtualenv.pyz?raw=true" -class VersionTuple(NamedTuple): +@dataclass(frozen=True) +class VersionTuple: version: Version version_string: str diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index 306e73ab..9f24f000 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -107,7 +107,7 @@ def main() -> None: help="Enable pre-release Python versions if available.", ) - args = parser.parse_args(namespace=CommandLineArguments()) + args = CommandLineArguments(**vars(parser.parse_args())) if args.platform != "auto": platform = args.platform diff --git a/cibuildwheel/bashlex_eval.py b/cibuildwheel/bashlex_eval.py index 9eb5eac3..a8b4691c 100644 --- a/cibuildwheel/bashlex_eval.py +++ b/cibuildwheel/bashlex_eval.py @@ -1,5 +1,6 @@ import subprocess -from typing import Callable, Dict, List, NamedTuple, Optional, Sequence +from dataclasses import dataclass +from typing import Callable, Dict, List, Optional, Sequence import bashlex @@ -13,7 +14,8 @@ def local_environment_executor(command: List[str], env: Dict[str, str]) -> str: ).stdout -class NodeExecutionContext(NamedTuple): +@dataclass(frozen=True) +class NodeExecutionContext: environment: Dict[str, str] input: str executor: EnvironmentExecutor diff --git a/cibuildwheel/linux.py b/cibuildwheel/linux.py index 8478bf09..a1862d77 100644 --- a/cibuildwheel/linux.py +++ b/cibuildwheel/linux.py @@ -1,8 +1,9 @@ import subprocess import sys import textwrap +from dataclasses import dataclass from pathlib import Path, PurePath -from typing import Iterator, List, NamedTuple, Set, Tuple +from typing import Iterator, List, Set, Tuple from .architecture import Architecture from .docker_container import DockerContainer @@ -18,7 +19,8 @@ from .util import ( ) -class PythonConfiguration(NamedTuple): +@dataclass(frozen=True) +class PythonConfiguration: version: str identifier: str path_str: str @@ -28,7 +30,8 @@ class PythonConfiguration(NamedTuple): return PurePath(self.path_str) -class BuildStep(NamedTuple): +@dataclass(frozen=True) +class BuildStep: platform_configs: List[PythonConfiguration] platform_tag: str docker_image: str diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index d2770315..cf9adba1 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -5,8 +5,9 @@ import re import shutil import subprocess import sys +from dataclasses import dataclass from pathlib import Path -from typing import Dict, List, NamedTuple, Sequence, Set, Tuple, cast +from typing import Dict, List, Sequence, Set, Tuple, cast from filelock import FileLock @@ -53,7 +54,8 @@ def get_macos_sdks() -> List[str]: return [m.group(1) for m in re.finditer(r"-sdk (macosx\S+)", output)] -class PythonConfiguration(NamedTuple): +@dataclass(frozen=True) +class PythonConfiguration: version: str identifier: str url: str diff --git a/cibuildwheel/options.py b/cibuildwheel/options.py index ce4f5a77..0385fc3e 100644 --- a/cibuildwheel/options.py +++ b/cibuildwheel/options.py @@ -4,24 +4,15 @@ import sys import traceback from configparser import ConfigParser from contextlib import contextmanager +from dataclasses import asdict, dataclass from pathlib import Path -from typing import ( - Any, - Dict, - Iterator, - List, - Mapping, - NamedTuple, - Optional, - Set, - Tuple, - Union, -) +from typing import Any, Dict, Iterator, List, Mapping, Optional, Set, Tuple, Union if sys.version_info >= (3, 11): import tomllib else: import tomli as tomllib + from packaging.specifiers import SpecifierSet from .architecture import Architecture @@ -43,6 +34,7 @@ from .util import ( ) +@dataclass class CommandLineArguments: platform: Literal["auto", "linux", "macos", "windows"] archs: Optional[str] @@ -54,7 +46,8 @@ class CommandLineArguments: prerelease_pythons: bool -class GlobalOptions(NamedTuple): +@dataclass(frozen=True) +class GlobalOptions: package_dir: Path output_dir: Path build_selector: BuildSelector @@ -62,7 +55,8 @@ class GlobalOptions(NamedTuple): architectures: Set[Architecture] -class BuildOptions(NamedTuple): +@dataclass(frozen=True) +class BuildOptions: globals: GlobalOptions environment: ParsedEnvironment before_all: str @@ -102,7 +96,8 @@ class BuildOptions(NamedTuple): Setting = Union[Dict[str, str], List[str], str, int] -class Override(NamedTuple): +@dataclass(frozen=True) +class Override: select_pattern: str options: Dict[str, Setting] @@ -550,12 +545,12 @@ class Options: def summary(self, identifiers: List[str]) -> str: lines = [ f"{option_name}: {option_value!r}" - for option_name, option_value in sorted(self.globals._asdict().items()) + for option_name, option_value in sorted(asdict(self.globals).items()) ] build_option_defaults = self.build_options(identifier=None) - for option_name, default_value in sorted(build_option_defaults._asdict().items()): + for option_name, default_value in sorted(asdict(build_option_defaults).items()): if option_name == "globals": continue @@ -563,7 +558,7 @@ class Options: # if any identifiers have an overridden value, print that too for identifier in identifiers: - option_value = self.build_options(identifier=identifier)._asdict()[option_name] + option_value = getattr(self.build_options(identifier=identifier), option_name) if option_value != default_value: lines.append(f" {identifier}: {option_value!r}") diff --git a/cibuildwheel/util.py b/cibuildwheel/util.py index 5015d348..5ce85bf8 100644 --- a/cibuildwheel/util.py +++ b/cibuildwheel/util.py @@ -1,5 +1,4 @@ import contextlib -import dataclasses import fnmatch import itertools import os @@ -11,6 +10,7 @@ import sys import textwrap import time import urllib.request +from dataclasses import dataclass from enum import Enum from functools import lru_cache from pathlib import Path @@ -22,7 +22,6 @@ from typing import ( Iterable, Iterator, List, - NamedTuple, Optional, Sequence, TextIO, @@ -228,7 +227,7 @@ def selector_matches(patterns: str, string: str) -> bool: # Once we require Python 3.10+, we can add kw_only=True -@dataclasses.dataclass +@dataclass(frozen=True) class IdentifierSelector: """ This class holds a set of build/skip patterns. You call an instance with a @@ -266,14 +265,14 @@ class IdentifierSelector: return should_build and not should_skip -@dataclasses.dataclass +@dataclass(frozen=True) class BuildSelector(IdentifierSelector): pass # Note that requires-python is not needed for TestSelector, as you can't test # what you can't build. -@dataclasses.dataclass +@dataclass(frozen=True) class TestSelector(IdentifierSelector): build_config: str = "*" @@ -413,6 +412,12 @@ def unwrap(text: str) -> str: return re.sub(r"\s+", " ", text) +@dataclass(frozen=True) +class FileReport: + name: str + size: str + + @contextlib.contextmanager def print_new_wheels(msg: str, output_dir: Path) -> Iterator[None]: """ @@ -427,10 +432,6 @@ def print_new_wheels(msg: str, output_dir: Path) -> Iterator[None]: yield final_contents = set(output_dir.iterdir()) - class FileReport(NamedTuple): - name: str - size: str - new_contents = [ FileReport(wheel.name, f"{(wheel.stat().st_size + 1023) // 1024:,d}") for wheel in final_contents - existing_contents diff --git a/cibuildwheel/windows.py b/cibuildwheel/windows.py index 13b5c0c3..ef9742ee 100644 --- a/cibuildwheel/windows.py +++ b/cibuildwheel/windows.py @@ -2,9 +2,10 @@ import os import shutil import subprocess import sys +from dataclasses import dataclass from functools import lru_cache from pathlib import Path -from typing import Dict, List, NamedTuple, Optional, Sequence, Set +from typing import Dict, List, Optional, Sequence, Set from zipfile import ZipFile from filelock import FileLock @@ -45,7 +46,8 @@ def get_nuget_args(version: str, arch: str, output_directory: Path) -> List[str] ] -class PythonConfiguration(NamedTuple): +@dataclass(frozen=True) +class PythonConfiguration: version: str arch: str identifier: str diff --git a/unit_test/utils.py b/unit_test/utils.py index 61833fa2..32e9331f 100644 --- a/unit_test/utils.py +++ b/unit_test/utils.py @@ -2,15 +2,15 @@ from cibuildwheel.options import CommandLineArguments def get_default_command_line_arguments() -> CommandLineArguments: - defaults = CommandLineArguments() - - defaults.platform = "auto" - defaults.allow_empty = False - defaults.archs = None - defaults.config_file = "" - defaults.output_dir = None - defaults.package_dir = "." - defaults.prerelease_pythons = False - defaults.print_build_identifiers = False + defaults = CommandLineArguments( + platform="auto", + allow_empty=False, + archs=None, + config_file="", + output_dir=None, + package_dir=".", + prerelease_pythons=False, + print_build_identifiers=False, + ) return defaults From c3750edebb7e37a73571088cd93ff6032348863f Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Sun, 19 Jun 2022 10:45:07 +0100 Subject: [PATCH 2/8] Document use of pip options through environment variables --- docs/options.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/options.md b/docs/options.md index f72b388a..3f12ed8e 100644 --- a/docs/options.md +++ b/docs/options.md @@ -553,6 +553,10 @@ Platform-specific environment variables are also available:
# Supply options to `pip` to affect how it downloads dependencies CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.myorg.com/simple + # Any pip command-line options can be set using the PIP_ prefix + # https://pip.pypa.io/en/stable/topics/configuration/#environment-variables + CIBW_ENVIRONMENT: PIP_GLOBAL_OPTION="build_ext -j4" + # Set two flags on linux only CIBW_ENVIRONMENT_LINUX: BUILD_TIME="$(date)" SAMPLE_TEXT="sample text" ``` @@ -582,6 +586,10 @@ Platform-specific environment variables are also available:
# Supply options to `pip` to affect how it downloads dependencies environment = { PIP_EXTRA_INDEX_URL="https://pypi.myorg.com/simple" } + # Any pip command-line option can be set using the PIP_ prefix + # https://pip.pypa.io/en/stable/topics/configuration/#environment-variables + environment = { PIP_GLOBAL_OPTION="build_ext -j4" } + # Set two flags on linux only [tool.cibuildwheel.linux] environment = { BUILD_TIME="$(date)", SAMPLE_TEXT="sample text" } From 68aef79a9b67e546f8770e3aad5f147918af7129 Mon Sep 17 00:00:00 2001 From: "cibuildwheel-bot[bot]" <83877280+cibuildwheel-bot[bot]@users.noreply.github.com> Date: Mon, 20 Jun 2022 06:59:44 +0000 Subject: [PATCH 3/8] Update dependencies --- .../resources/constraints-python310.txt | 2 +- .../resources/constraints-python311.txt | 2 +- .../resources/constraints-python37.txt | 2 +- .../resources/constraints-python38.txt | 2 +- .../resources/constraints-python39.txt | 2 +- cibuildwheel/resources/constraints.txt | 2 +- .../resources/pinned_docker_images.cfg | 64 +++--- docs/working-examples.md | 206 +++++++++--------- 8 files changed, 141 insertions(+), 141 deletions(-) diff --git a/cibuildwheel/resources/constraints-python310.txt b/cibuildwheel/resources/constraints-python310.txt index 9c96aa12..86e4bdf0 100644 --- a/cibuildwheel/resources/constraints-python310.txt +++ b/cibuildwheel/resources/constraints-python310.txt @@ -26,5 +26,5 @@ wheel==0.37.1 # The following packages are considered to be unsafe in a requirements file: pip==22.1.2 # via -r cibuildwheel/resources/constraints.in -setuptools==62.4.0 +setuptools==62.6.0 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python311.txt b/cibuildwheel/resources/constraints-python311.txt index 82e6c46d..beaa5107 100644 --- a/cibuildwheel/resources/constraints-python311.txt +++ b/cibuildwheel/resources/constraints-python311.txt @@ -26,5 +26,5 @@ wheel==0.37.1 # The following packages are considered to be unsafe in a requirements file: pip==22.1.2 # via -r cibuildwheel/resources/constraints.in -setuptools==62.4.0 +setuptools==62.6.0 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python37.txt b/cibuildwheel/resources/constraints-python37.txt index e0a25472..25a3a1d6 100644 --- a/cibuildwheel/resources/constraints-python37.txt +++ b/cibuildwheel/resources/constraints-python37.txt @@ -32,5 +32,5 @@ zipp==3.8.0 # The following packages are considered to be unsafe in a requirements file: pip==22.1.2 # via -r cibuildwheel/resources/constraints.in -setuptools==62.4.0 +setuptools==62.6.0 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python38.txt b/cibuildwheel/resources/constraints-python38.txt index 971a8e42..a9e3d2c5 100644 --- a/cibuildwheel/resources/constraints-python38.txt +++ b/cibuildwheel/resources/constraints-python38.txt @@ -26,5 +26,5 @@ wheel==0.37.1 # The following packages are considered to be unsafe in a requirements file: pip==22.1.2 # via -r cibuildwheel/resources/constraints.in -setuptools==62.4.0 +setuptools==62.6.0 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python39.txt b/cibuildwheel/resources/constraints-python39.txt index 8f6d1c00..e5134e9f 100644 --- a/cibuildwheel/resources/constraints-python39.txt +++ b/cibuildwheel/resources/constraints-python39.txt @@ -26,5 +26,5 @@ wheel==0.37.1 # The following packages are considered to be unsafe in a requirements file: pip==22.1.2 # via -r cibuildwheel/resources/constraints.in -setuptools==62.4.0 +setuptools==62.6.0 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints.txt b/cibuildwheel/resources/constraints.txt index 8f6d1c00..e5134e9f 100644 --- a/cibuildwheel/resources/constraints.txt +++ b/cibuildwheel/resources/constraints.txt @@ -26,5 +26,5 @@ wheel==0.37.1 # The following packages are considered to be unsafe in a requirements file: pip==22.1.2 # via -r cibuildwheel/resources/constraints.in -setuptools==62.4.0 +setuptools==62.6.0 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/pinned_docker_images.cfg b/cibuildwheel/resources/pinned_docker_images.cfg index 0a7c6592..ecb061c4 100644 --- a/cibuildwheel/resources/pinned_docker_images.cfg +++ b/cibuildwheel/resources/pinned_docker_images.cfg @@ -1,48 +1,48 @@ [x86_64] -manylinux1 = quay.io/pypa/manylinux1_x86_64:2022-06-12-a846b05 -manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-06-13-c365205 -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-06-13-c365205 -manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-06-13-c365205 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-06-13-c365205 -musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2022-06-13-c365205 +manylinux1 = quay.io/pypa/manylinux1_x86_64:2022-06-19-48acfad +manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-06-20-d72b943 +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-06-20-d72b943 +manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-06-20-d72b943 +manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-06-20-d72b943 +musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2022-06-20-d72b943 [i686] -manylinux1 = quay.io/pypa/manylinux1_i686:2022-06-12-a846b05 -manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-06-13-c365205 -manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-06-13-c365205 -manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-06-13-c365205 -musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2022-06-13-c365205 +manylinux1 = quay.io/pypa/manylinux1_i686:2022-06-19-48acfad +manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-06-20-d72b943 +manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-06-20-d72b943 +manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-06-20-d72b943 +musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2022-06-20-d72b943 [pypy_x86_64] -manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-06-13-c365205 -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-06-13-c365205 -manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-06-13-c365205 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-06-13-c365205 +manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-06-20-d72b943 +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-06-20-d72b943 +manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-06-20-d72b943 +manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-06-20-d72b943 [pypy_i686] -manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-06-13-c365205 -manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-06-13-c365205 -manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-06-13-c365205 +manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-06-20-d72b943 +manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-06-20-d72b943 +manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-06-20-d72b943 [aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-06-13-c365205 -manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-06-13-c365205 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-06-13-c365205 -musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2022-06-13-c365205 +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-06-20-d72b943 +manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-06-20-d72b943 +manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-06-20-d72b943 +musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2022-06-20-d72b943 [ppc64le] -manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2022-06-13-c365205 -manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-06-13-c365205 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2022-06-13-c365205 -musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2022-06-13-c365205 +manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2022-06-20-d72b943 +manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-06-20-d72b943 +manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2022-06-20-d72b943 +musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2022-06-20-d72b943 [s390x] -manylinux2014 = quay.io/pypa/manylinux2014_s390x:2022-06-13-c365205 -manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-06-13-c365205 -musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2022-06-13-c365205 +manylinux2014 = quay.io/pypa/manylinux2014_s390x:2022-06-20-d72b943 +manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-06-20-d72b943 +musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2022-06-20-d72b943 [pypy_aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-06-13-c365205 -manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-06-13-c365205 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-06-13-c365205 +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-06-20-d72b943 +manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-06-20-d72b943 +manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-06-20-d72b943 diff --git a/docs/working-examples.md b/docs/working-examples.md index 2845ebec..0fbf1f55 100644 --- a/docs/working-examples.md +++ b/docs/working-examples.md @@ -18,8 +18,8 @@ title: Working examples | [Prophet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth. | | [MyPy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | The compiled version of MyPy using MyPyC. | | [pydantic][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Data parsing and validation using Python type hints | -| [uvloop][] | ![github icon][] | ![apple icon][] ![linux icon][] | Ultra fast asyncio event loop. | | [MemRay][] | ![github icon][] | ![linux icon][] | Memray is a memory profiler for Python | +| [uvloop][] | ![github icon][] | ![apple icon][] ![linux icon][] | Ultra fast asyncio event loop. | | [psutil][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Cross-platform lib for process and system monitoring in Python | | [vaex][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Out-of-Core hybrid Apache Arrow/NumPy DataFrame for Python, ML, visualization and exploration of big tabular data at a billion rows per second 🚀 | | [Google Benchmark][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A microbenchmark support library | @@ -52,8 +52,8 @@ title: Working examples | [Wrapt][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python module for decorators, wrappers and monkey patching. | | [PyAV][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Pythonic bindings for FFmpeg's libraries. | | [SimpleJSON][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | simplejson is a simple, fast, extensible JSON encoder/decoder for Python | -| [OpenColorIO][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A color management framework for visual effects and animation. | | [pikepdf][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python library for reading and writing PDF, powered by qpdf | +| [OpenColorIO][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A color management framework for visual effects and animation. | | [Line Profiler][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Line-by-line profiling for Python | | [PyTables][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python package to manage extremely large amounts of data | | [OpenTimelineIO][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Open Source API and interchange format for editorial timeline information. | @@ -86,8 +86,8 @@ title: Working examples | [PyGLM][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Fast OpenGL Mathematics (GLM) for Python | | [boost-histogram][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Supports full range of wheels, including PyPy and alternate archs. | | [bx-python][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | A library that includes Cython extensions. | -| [iDynTree][] | ![github icon][] | ![linux icon][] | Uses manylinux_2_24 | | [TgCrypto][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. | +| [iDynTree][] | ![github icon][] | ![linux icon][] | Uses manylinux_2_24 | | [Python-WebRTC][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | a Python extension that provides bindings to WebRTC M92 | | [pybase64][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast Base64 encoding/decoding in Python | | [Arbor][] | ![github icon][] | ![apple icon][] ![linux icon][] | Arbor is a multi-compartment neuron simulation library; compatible with next-generation accelerators; best-practices applied to research software; focused on community-driven development. Includes a [small script](https://github.com/arbor-sim/arbor/blob/master/scripts/patchwheel.py) patching `rpath` in bundled libraries. | @@ -118,8 +118,8 @@ title: Working examples [Prophet]: https://github.com/facebook/prophet [MyPy]: https://github.com/mypyc/mypy_mypyc-wheels [pydantic]: https://github.com/samuelcolvin/pydantic -[uvloop]: https://github.com/MagicStack/uvloop [MemRay]: https://github.com/bloomberg/memray +[uvloop]: https://github.com/MagicStack/uvloop [psutil]: https://github.com/giampaolo/psutil [vaex]: https://github.com/vaexio/vaex [Google Benchmark]: https://github.com/google/benchmark @@ -152,8 +152,8 @@ title: Working examples [Wrapt]: https://github.com/GrahamDumpleton/wrapt [PyAV]: https://github.com/PyAV-Org/PyAV [SimpleJSON]: https://github.com/simplejson/simplejson -[OpenColorIO]: https://github.com/AcademySoftwareFoundation/OpenColorIO [pikepdf]: https://github.com/pikepdf/pikepdf +[OpenColorIO]: https://github.com/AcademySoftwareFoundation/OpenColorIO [Line Profiler]: https://github.com/pyutils/line_profiler [PyTables]: https://github.com/PyTables/PyTables [OpenTimelineIO]: https://github.com/PixarAnimationStudios/OpenTimelineIO @@ -186,8 +186,8 @@ title: Working examples [PyGLM]: https://github.com/Zuzu-Typ/PyGLM [boost-histogram]: https://github.com/scikit-hep/boost-histogram [bx-python]: https://github.com/bxlab/bx-python -[iDynTree]: https://github.com/robotology/idyntree [TgCrypto]: https://github.com/pyrogram/tgcrypto +[iDynTree]: https://github.com/robotology/idyntree [Python-WebRTC]: https://github.com/MarshalX/python-webrtc [pybase64]: https://github.com/mayeut/pybase64 [Arbor]: https://github.com/arbor-sim/arbor @@ -218,105 +218,105 @@ title: Working examples [apple icon]: data/readme_icons/apple.svg [linux icon]: data/readme_icons/linux.svg - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + From 4bc5d9043021bbd9a0cd303d7ff6bba998f5294d Mon Sep 17 00:00:00 2001 From: "cibuildwheel-bot[bot]" <83877280+cibuildwheel-bot[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 06:16:07 +0000 Subject: [PATCH 4/8] Update dependencies --- .../resources/constraints-python310.txt | 2 +- .../resources/constraints-python311.txt | 2 +- .../resources/constraints-python36.txt | 2 +- .../resources/constraints-python37.txt | 4 +- .../resources/constraints-python38.txt | 2 +- .../resources/constraints-python39.txt | 2 +- cibuildwheel/resources/constraints.txt | 2 +- .../resources/pinned_docker_images.cfg | 64 +++--- cibuildwheel/resources/virtualenv.toml | 4 +- docs/working-examples.md | 202 +++++++++--------- 10 files changed, 143 insertions(+), 143 deletions(-) diff --git a/cibuildwheel/resources/constraints-python310.txt b/cibuildwheel/resources/constraints-python310.txt index 86e4bdf0..6f02809e 100644 --- a/cibuildwheel/resources/constraints-python310.txt +++ b/cibuildwheel/resources/constraints-python310.txt @@ -16,7 +16,7 @@ six==1.16.0 # via virtualenv typing-extensions==4.2.0 # via delocate -virtualenv==20.14.1 +virtualenv==20.15.0 # via -r cibuildwheel/resources/constraints.in wheel==0.37.1 # via diff --git a/cibuildwheel/resources/constraints-python311.txt b/cibuildwheel/resources/constraints-python311.txt index beaa5107..5d69e081 100644 --- a/cibuildwheel/resources/constraints-python311.txt +++ b/cibuildwheel/resources/constraints-python311.txt @@ -16,7 +16,7 @@ six==1.16.0 # via virtualenv typing-extensions==4.2.0 # via delocate -virtualenv==20.14.1 +virtualenv==20.15.0 # via -r cibuildwheel/resources/constraints.in wheel==0.37.1 # via diff --git a/cibuildwheel/resources/constraints-python36.txt b/cibuildwheel/resources/constraints-python36.txt index 9ca0fd11..e5bc034c 100644 --- a/cibuildwheel/resources/constraints-python36.txt +++ b/cibuildwheel/resources/constraints-python36.txt @@ -22,7 +22,7 @@ typing-extensions==4.1.1 # via # delocate # importlib-metadata -virtualenv==20.14.1 +virtualenv==20.15.0 # via -r cibuildwheel/resources/constraints.in wheel==0.37.1 # via diff --git a/cibuildwheel/resources/constraints-python37.txt b/cibuildwheel/resources/constraints-python37.txt index 25a3a1d6..93118618 100644 --- a/cibuildwheel/resources/constraints-python37.txt +++ b/cibuildwheel/resources/constraints-python37.txt @@ -10,7 +10,7 @@ distlib==0.3.4 # via virtualenv filelock==3.7.1 # via virtualenv -importlib-metadata==4.11.4 +importlib-metadata==4.12.0 # via virtualenv platformdirs==2.5.2 # via virtualenv @@ -20,7 +20,7 @@ typing-extensions==4.2.0 # via # delocate # importlib-metadata -virtualenv==20.14.1 +virtualenv==20.15.0 # via -r cibuildwheel/resources/constraints.in wheel==0.37.1 # via diff --git a/cibuildwheel/resources/constraints-python38.txt b/cibuildwheel/resources/constraints-python38.txt index a9e3d2c5..3de94015 100644 --- a/cibuildwheel/resources/constraints-python38.txt +++ b/cibuildwheel/resources/constraints-python38.txt @@ -16,7 +16,7 @@ six==1.16.0 # via virtualenv typing-extensions==4.2.0 # via delocate -virtualenv==20.14.1 +virtualenv==20.15.0 # via -r cibuildwheel/resources/constraints.in wheel==0.37.1 # via diff --git a/cibuildwheel/resources/constraints-python39.txt b/cibuildwheel/resources/constraints-python39.txt index e5134e9f..8c407bb0 100644 --- a/cibuildwheel/resources/constraints-python39.txt +++ b/cibuildwheel/resources/constraints-python39.txt @@ -16,7 +16,7 @@ six==1.16.0 # via virtualenv typing-extensions==4.2.0 # via delocate -virtualenv==20.14.1 +virtualenv==20.15.0 # via -r cibuildwheel/resources/constraints.in wheel==0.37.1 # via diff --git a/cibuildwheel/resources/constraints.txt b/cibuildwheel/resources/constraints.txt index e5134e9f..8c407bb0 100644 --- a/cibuildwheel/resources/constraints.txt +++ b/cibuildwheel/resources/constraints.txt @@ -16,7 +16,7 @@ six==1.16.0 # via virtualenv typing-extensions==4.2.0 # via delocate -virtualenv==20.14.1 +virtualenv==20.15.0 # via -r cibuildwheel/resources/constraints.in wheel==0.37.1 # via diff --git a/cibuildwheel/resources/pinned_docker_images.cfg b/cibuildwheel/resources/pinned_docker_images.cfg index ecb061c4..9d8e6297 100644 --- a/cibuildwheel/resources/pinned_docker_images.cfg +++ b/cibuildwheel/resources/pinned_docker_images.cfg @@ -1,48 +1,48 @@ [x86_64] -manylinux1 = quay.io/pypa/manylinux1_x86_64:2022-06-19-48acfad -manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-06-20-d72b943 -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-06-20-d72b943 -manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-06-20-d72b943 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-06-20-d72b943 -musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2022-06-20-d72b943 +manylinux1 = quay.io/pypa/manylinux1_x86_64:2022-06-26-ddecca8 +manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-06-26-9a2ca4b +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-06-26-9a2ca4b +manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-06-26-9a2ca4b +manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-06-26-9a2ca4b +musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2022-06-26-9a2ca4b [i686] -manylinux1 = quay.io/pypa/manylinux1_i686:2022-06-19-48acfad -manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-06-20-d72b943 -manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-06-20-d72b943 -manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-06-20-d72b943 -musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2022-06-20-d72b943 +manylinux1 = quay.io/pypa/manylinux1_i686:2022-06-26-ddecca8 +manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-06-26-9a2ca4b +manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-06-26-9a2ca4b +manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-06-26-9a2ca4b +musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2022-06-26-9a2ca4b [pypy_x86_64] -manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-06-20-d72b943 -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-06-20-d72b943 -manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-06-20-d72b943 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-06-20-d72b943 +manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-06-26-9a2ca4b +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-06-26-9a2ca4b +manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-06-26-9a2ca4b +manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-06-26-9a2ca4b [pypy_i686] -manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-06-20-d72b943 -manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-06-20-d72b943 -manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-06-20-d72b943 +manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-06-26-9a2ca4b +manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-06-26-9a2ca4b +manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-06-26-9a2ca4b [aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-06-20-d72b943 -manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-06-20-d72b943 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-06-20-d72b943 -musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2022-06-20-d72b943 +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-06-26-9a2ca4b +manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-06-26-9a2ca4b +manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-06-26-9a2ca4b +musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2022-06-26-9a2ca4b [ppc64le] -manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2022-06-20-d72b943 -manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-06-20-d72b943 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2022-06-20-d72b943 -musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2022-06-20-d72b943 +manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2022-06-26-9a2ca4b +manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-06-26-9a2ca4b +manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2022-06-26-9a2ca4b +musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2022-06-26-9a2ca4b [s390x] -manylinux2014 = quay.io/pypa/manylinux2014_s390x:2022-06-20-d72b943 -manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-06-20-d72b943 -musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2022-06-20-d72b943 +manylinux2014 = quay.io/pypa/manylinux2014_s390x:2022-06-26-9a2ca4b +manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-06-26-9a2ca4b +musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2022-06-26-9a2ca4b [pypy_aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-06-20-d72b943 -manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-06-20-d72b943 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-06-20-d72b943 +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-06-26-9a2ca4b +manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-06-26-9a2ca4b +manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-06-26-9a2ca4b diff --git a/cibuildwheel/resources/virtualenv.toml b/cibuildwheel/resources/virtualenv.toml index 2296e59f..01489be2 100644 --- a/cibuildwheel/resources/virtualenv.toml +++ b/cibuildwheel/resources/virtualenv.toml @@ -1,2 +1,2 @@ -version = "20.14.1" -url = "https://github.com/pypa/get-virtualenv/blob/20.14.1/public/virtualenv.pyz?raw=true" +version = "20.15.0" +url = "https://github.com/pypa/get-virtualenv/blob/20.15.0/public/virtualenv.pyz?raw=true" diff --git a/docs/working-examples.md b/docs/working-examples.md index 0fbf1f55..a478ee7f 100644 --- a/docs/working-examples.md +++ b/docs/working-examples.md @@ -75,8 +75,8 @@ title: Working examples | [pybind11 python_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a Python-based build system | | [dd-trace-py][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Uses custom alternate arch emulation on GitHub | | [sourmash][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Quickly search, compare, and analyze genomic and metagenomic data sets. | -| [time-machine][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Time mocking library using only the CPython C API. | | [CTranslate2][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes libraries from the [Intel oneAPI toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html) and CUDA kernels compiled for multiple GPU architectures. | +| [time-machine][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Time mocking library using only the CPython C API. | | [cyvcf2][] | ![github icon][] | ![apple icon][] ![linux icon][] | cython + htslib == fast VCF and BCF processing | | [matrixprofile][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python 3 library making time series data mining tasks, utilizing matrix profile algorithms, accessible to everyone. | | [abess][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A fast best-subset selection library. It uses cibuildwheel to build a large project with C++ extensions. | @@ -86,8 +86,8 @@ title: Working examples | [PyGLM][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Fast OpenGL Mathematics (GLM) for Python | | [boost-histogram][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Supports full range of wheels, including PyPy and alternate archs. | | [bx-python][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | A library that includes Cython extensions. | -| [TgCrypto][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. | | [iDynTree][] | ![github icon][] | ![linux icon][] | Uses manylinux_2_24 | +| [TgCrypto][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. | | [Python-WebRTC][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | a Python extension that provides bindings to WebRTC M92 | | [pybase64][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast Base64 encoding/decoding in Python | | [Arbor][] | ![github icon][] | ![apple icon][] ![linux icon][] | Arbor is a multi-compartment neuron simulation library; compatible with next-generation accelerators; best-practices applied to research software; focused on community-driven development. Includes a [small script](https://github.com/arbor-sim/arbor/blob/master/scripts/patchwheel.py) patching `rpath` in bundled libraries. | @@ -175,8 +175,8 @@ title: Working examples [pybind11 python_example]: https://github.com/pybind/python_example [dd-trace-py]: https://github.com/DataDog/dd-trace-py [sourmash]: https://github.com/dib-lab/sourmash -[time-machine]: https://github.com/adamchainz/time-machine [CTranslate2]: https://github.com/OpenNMT/CTranslate2 +[time-machine]: https://github.com/adamchainz/time-machine [cyvcf2]: https://github.com/brentp/cyvcf2 [matrixprofile]: https://github.com/matrix-profile-foundation/matrixprofile [abess]: https://github.com/abess-team/abess @@ -186,8 +186,8 @@ title: Working examples [PyGLM]: https://github.com/Zuzu-Typ/PyGLM [boost-histogram]: https://github.com/scikit-hep/boost-histogram [bx-python]: https://github.com/bxlab/bx-python -[TgCrypto]: https://github.com/pyrogram/tgcrypto [iDynTree]: https://github.com/robotology/idyntree +[TgCrypto]: https://github.com/pyrogram/tgcrypto [Python-WebRTC]: https://github.com/MarshalX/python-webrtc [pybase64]: https://github.com/mayeut/pybase64 [Arbor]: https://github.com/arbor-sim/arbor @@ -218,105 +218,105 @@ title: Working examples [apple icon]: data/readme_icons/apple.svg [linux icon]: data/readme_icons/linux.svg - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + From e7de8a47607f09b4e063b93ccfcfc70c8e914b17 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 18:35:29 +0000 Subject: [PATCH 5/8] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/hadialqattan/pycln: v1.3.3 → v1.3.5](https://github.com/hadialqattan/pycln/compare/v1.3.3...v1.3.5) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 679254fd..89126ed2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,7 +27,7 @@ repos: # Autoremoves unused imports - repo: https://github.com/hadialqattan/pycln - rev: v1.3.3 + rev: v1.3.5 hooks: - id: pycln args: [--all] From 075792473a7e6ffa59040b0dc66dc2b4d85b3e77 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Wed, 29 Jun 2022 18:10:35 -0400 Subject: [PATCH 6/8] chore: simpler dependabot (#1165) * chore: simpler dependabot Ignores no longer needed after April 2022. Dependabot keeps the same style pinning now. * Update faq.md --- .github/dependabot.yml | 3 --- docs/faq.md | 4 ---- 2 files changed, 7 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ce05ac5c..6fddca0d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,6 +5,3 @@ updates: directory: "/" schedule: interval: "weekly" - ignore: - - dependency-name: "actions/*" - update-types: ["version-update:semver-minor", "version-update:semver-patch"] diff --git a/docs/faq.md b/docs/faq.md index 66c05618..b66bd0e4 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -147,10 +147,6 @@ updates: directory: "/" schedule: interval: "weekly" - ignore: - # Optional: Official actions have moving tags like v1; - # if you use those, you don't need updates. - - dependency-name: "actions/*" ``` #### Option 2: Requirement files From 9a537512c141c050e89f7b6e251f6dfb9b0898a7 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Sun, 3 Jul 2022 20:00:00 +0200 Subject: [PATCH 7/8] feat: add support for `py3-none-{platform}` wheels (#1151) * feature: add support for `py3-none-{platform}` wheels This extends the mechanism introduced in #1091 for `abi3` wheels. Most of the mentions to `abi3` have been removed and replaced by a more generic `compatible_wheel`. This allows to build a wheel `foo-0.1-py3-none-win_amd64.whl` only once and still test with every configured python. * Add integration test for py3-none abi wheels * Fix expected_wheels for py3-none abi * Limit test to three pythons and check for certain log messages * chore: add some comments to explain filter process Co-authored-by: Joe Rickerby Co-authored-by: Henry Schreiner --- cibuildwheel/linux.py | 12 +-- cibuildwheel/macos.py | 12 +-- cibuildwheel/util.py | 37 +++++--- cibuildwheel/windows.py | 12 +-- setup.cfg | 4 +- test/test_abi_variants.py | 179 ++++++++++++++++++++++++++++++++++++++ test/test_limited_api.py | 50 ----------- test/utils.py | 34 ++++---- unit_test/utils_test.py | 44 +++++++++- 9 files changed, 284 insertions(+), 100 deletions(-) create mode 100644 test/test_abi_variants.py delete mode 100644 test/test_limited_api.py diff --git a/cibuildwheel/linux.py b/cibuildwheel/linux.py index b278d48b..70f91c10 100644 --- a/cibuildwheel/linux.py +++ b/cibuildwheel/linux.py @@ -13,7 +13,7 @@ from .typing import OrderedDict, PathOrStr, assert_never from .util import ( BuildSelector, NonPlatformWheelError, - find_compatible_abi3_wheel, + find_compatible_wheel, get_build_verbosity_extra_flags, prepare_command, read_python_configs, @@ -180,13 +180,13 @@ def build_on_docker( ) sys.exit(1) - abi3_wheel = find_compatible_abi3_wheel(built_wheels, config.identifier) - if abi3_wheel: + compatible_wheel = find_compatible_wheel(built_wheels, config.identifier) + if compatible_wheel: log.step_end() print( - f"\nFound previously built wheel {abi3_wheel.name}, that's compatible with {config.identifier}. Skipping build step..." + f"\nFound previously built wheel {compatible_wheel.name}, that's compatible with {config.identifier}. Skipping build step..." ) - repaired_wheels = [abi3_wheel] + repaired_wheels = [compatible_wheel] else: if build_options.before_build: @@ -307,7 +307,7 @@ def build_on_docker( docker.call(["rm", "-rf", venv_dir]) # move repaired wheels to output - if abi3_wheel is None: + if compatible_wheel is None: docker.call(["mkdir", "-p", container_output_dir]) docker.call(["mv", *repaired_wheels, container_output_dir]) built_wheels.extend( diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 2da719ea..22213de8 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -24,7 +24,7 @@ from .util import ( call, detect_ci_provider, download, - find_compatible_abi3_wheel, + find_compatible_wheel, get_build_verbosity_extra_flags, get_pip_version, install_certifi_script, @@ -323,13 +323,13 @@ def build(options: Options, tmp_path: Path) -> None: build_options.build_frontend, ) - abi3_wheel = find_compatible_abi3_wheel(built_wheels, config.identifier) - if abi3_wheel: + compatible_wheel = find_compatible_wheel(built_wheels, config.identifier) + if compatible_wheel: log.step_end() print( - f"\nFound previously built wheel {abi3_wheel.name}, that's compatible with {config.identifier}. Skipping build step..." + f"\nFound previously built wheel {compatible_wheel.name}, that's compatible with {config.identifier}. Skipping build step..." ) - repaired_wheel = abi3_wheel + repaired_wheel = compatible_wheel else: if build_options.before_build: log.step("Running before_build...") @@ -536,7 +536,7 @@ def build(options: Options, tmp_path: Path) -> None: ) # we're all done here; move it to output (overwrite existing) - if abi3_wheel is None: + if compatible_wheel is None: try: (build_options.output_dir / repaired_wheel.name).unlink() except FileNotFoundError: diff --git a/cibuildwheel/util.py b/cibuildwheel/util.py index 9bc151cc..d3f42bda 100644 --- a/cibuildwheel/util.py +++ b/cibuildwheel/util.py @@ -53,7 +53,7 @@ __all__ = [ "MANYLINUX_ARCHS", "call", "shell", - "find_compatible_abi3_wheel", + "find_compatible_wheel", "format_safe", "prepare_command", "get_build_verbosity_extra_flags", @@ -575,36 +575,47 @@ def virtualenv( T = TypeVar("T", bound=PurePath) -def find_compatible_abi3_wheel(wheels: Sequence[T], identifier: str) -> Optional[T]: +def find_compatible_wheel(wheels: Sequence[T], identifier: str) -> Optional[T]: """ - Finds an ABI3 wheel in `wheels` compatible with the Python interpreter - specified by `identifier`. + Finds a wheel with an abi3 or a none ABI tag in `wheels` compatible with the Python interpreter + specified by `identifier` that is previously built. """ interpreter, platform = identifier.split("-") - if not interpreter.startswith("cp3"): - return None for wheel in wheels: _, _, _, tags = parse_wheel_filename(wheel.name) for tag in tags: - if tag.abi != "abi3": + if tag.abi == "abi3": + # ABI3 wheels must start with cp3 for impl and tag + if not (interpreter.startswith("cp3") and tag.interpreter.startswith("cp3")): + continue + elif tag.abi == "none": + # CPythonless wheels must include py3 tag + if tag.interpreter[:3] != "py3": + continue + else: + # Other types of wheels are not detected, this is looking for previously built wheels. continue - if not tag.interpreter.startswith("cp3"): - continue - if int(tag.interpreter[3:]) > int(interpreter[3:]): + + if tag.interpreter != "py3" and int(tag.interpreter[3:]) > int(interpreter[3:]): + # If a minor version number is given, it has to be lower than the current one. continue + if platform.startswith(("manylinux", "musllinux", "macosx")): - # Linux, macOS + # Linux, macOS require the beginning and ending match (macos/manylinux version doesn't need to) os_, arch = platform.split("_", 1) if not tag.platform.startswith(os_): continue - if not tag.platform.endswith("_" + arch): + if not tag.platform.endswith(f"_{arch}"): continue else: - # Windows + # Windows should exactly match if not tag.platform == platform: continue + + # If all the filters above pass, then the wheel is a previously built compatible wheel. return wheel + return None diff --git a/cibuildwheel/windows.py b/cibuildwheel/windows.py index 0ad2e2ae..46b8bf90 100644 --- a/cibuildwheel/windows.py +++ b/cibuildwheel/windows.py @@ -23,7 +23,7 @@ from .util import ( NonPlatformWheelError, call, download, - find_compatible_abi3_wheel, + find_compatible_wheel, get_build_verbosity_extra_flags, get_pip_version, prepare_command, @@ -279,13 +279,13 @@ def build(options: Options, tmp_path: Path) -> None: build_options.build_frontend, ) - abi3_wheel = find_compatible_abi3_wheel(built_wheels, config.identifier) - if abi3_wheel: + compatible_wheel = find_compatible_wheel(built_wheels, config.identifier) + if compatible_wheel: log.step_end() print( - f"\nFound previously built wheel {abi3_wheel.name}, that's compatible with {config.identifier}. Skipping build step..." + f"\nFound previously built wheel {compatible_wheel.name}, that's compatible with {config.identifier}. Skipping build step..." ) - repaired_wheel = abi3_wheel + repaired_wheel = compatible_wheel else: # run the before_build command if build_options.before_build: @@ -420,7 +420,7 @@ def build(options: Options, tmp_path: Path) -> None: shell(test_command_prepared, cwd="c:\\", env=virtualenv_env) # we're all done here; move it to output (remove if already exists) - if abi3_wheel is None: + if compatible_wheel is None: shutil.move(str(repaired_wheel), build_options.output_dir) built_wheels.append(build_options.output_dir / repaired_wheel.name) diff --git a/setup.cfg b/setup.cfg index 4f91bf92..838631e0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -56,8 +56,8 @@ console_scripts = cibuildwheel = resources/* [flake8] -extend-ignore = E203,E501,B950 -extend-select = B,B9 +extend-ignore = E203,E501,B950,B023 +extend-select = B9 application-import-names = cibuildwheel exclude = cibuildwheel/resources/, diff --git a/test/test_abi_variants.py b/test/test_abi_variants.py new file mode 100644 index 00000000..932a2ec0 --- /dev/null +++ b/test/test_abi_variants.py @@ -0,0 +1,179 @@ +import textwrap + +from . import test_projects, utils + +limited_api_project = test_projects.new_c_project( + setup_py_add=textwrap.dedent( + r""" + cmdclass = {} + extension_kwargs = {} + if sys.version_info[:2] >= (3, 8): + from wheel.bdist_wheel import bdist_wheel as _bdist_wheel + + class bdist_wheel_abi3(_bdist_wheel): + def finalize_options(self): + _bdist_wheel.finalize_options(self) + self.root_is_pure = False + + def get_tag(self): + python, abi, plat = _bdist_wheel.get_tag(self) + return python, "abi3", plat + + cmdclass["bdist_wheel"] = bdist_wheel_abi3 + extension_kwargs["define_macros"] = [("Py_LIMITED_API", "0x03080000")] + extension_kwargs["py_limited_api"] = True + """ + ), + setup_py_extension_args_add="**extension_kwargs", + setup_py_setup_args_add="cmdclass=cmdclass", +) + + +def test_abi3(tmp_path): + project_dir = tmp_path / "project" + limited_api_project.generate(project_dir) + + # build the wheels + actual_wheels = utils.cibuildwheel_run( + project_dir, + add_env={ + "CIBW_SKIP": "pp* ", # PyPy does not have a Py_LIMITED_API equivalent + }, + ) + + # check that the expected wheels are produced + expected_wheels = [ + w.replace("cp38-cp38", "cp38-abi3") + for w in utils.expected_wheels("spam", "0.1.0") + if "-pp" not in w and "-cp39" not in w and "-cp310" not in w and "-cp311" not in w + ] + assert set(actual_wheels) == set(expected_wheels) + + +ctypes_project = test_projects.TestProject() +ctypes_project.files["setup.py"] = textwrap.dedent( + """ + from setuptools import setup, Extension + + from distutils.command.build_ext import build_ext as _build_ext + class CTypesExtension(Extension): pass + class build_ext(_build_ext): + def build_extension(self, ext): + self._ctypes = isinstance(ext, CTypesExtension) + return super().build_extension(ext) + + def get_export_symbols(self, ext): + if self._ctypes: + return ext.export_symbols + return super().get_export_symbols(ext) + + def get_ext_filename(self, ext_name): + if self._ctypes: + return ext_name + '.so' + return super().get_ext_filename(ext_name) + + from wheel.bdist_wheel import bdist_wheel as _bdist_wheel + class bdist_wheel_abi_none(_bdist_wheel): + def finalize_options(self): + _bdist_wheel.finalize_options(self) + self.root_is_pure = False + + def get_tag(self): + python, abi, plat = _bdist_wheel.get_tag(self) + return "py3", "none", plat + + setup( + name="ctypesexample", + version="1.0.0", + py_modules = ["ctypesexample.summing"], + ext_modules=[ + CTypesExtension( + "ctypesexample.csumlib", + ["ctypesexample/csumlib.c"], + ), + ], + cmdclass={'build_ext': build_ext, 'bdist_wheel': bdist_wheel_abi_none}, + ) + """ +) +ctypes_project.files["ctypesexample/csumlib.c"] = textwrap.dedent( + """ + #ifdef _WIN32 + #define LIBRARY_API __declspec(dllexport) + #else + #define LIBRARY_API + #endif + + #include + + + LIBRARY_API double *add_vec3(double *a, double *b) + { + double *res = malloc(sizeof(double) * 3); + + for (int i = 0; i < 3; ++i) + { + res[i] = a[i] + b[i]; + } + + return res; + } + """ +) +ctypes_project.files["ctypesexample/summing.py"] = textwrap.dedent( + """ + import ctypes + import pathlib + + # path of the shared library + libfile = pathlib.Path(__file__).parent / "csumlib.so" + csumlib = ctypes.CDLL(str(libfile)) + + type_vec3 = ctypes.POINTER(ctypes.c_double * 3) + + csumlib.add_vec3.restype = type_vec3 + csumlib.add_vec3.argtypes = [type_vec3, type_vec3] + def add(a: list, b: list) -> list: + a_p = (ctypes.c_double * 3)(*a) + b_p = (ctypes.c_double * 3)(*b) + r_p = csumlib.add_vec3(a_p,b_p) + + return [l for l in r_p.contents] + """ +) + +ctypes_project.files["test/add_test.py"] = textwrap.dedent( + """ + import ctypesexample.summing + + def test(): + a = [1, 2, 3] + b = [4, 5, 6] + assert ctypesexample.summing.add(a, b) == [5, 7, 9] + """ +) + + +def test_abi_none(tmp_path, capfd): + project_dir = tmp_path / "project" + ctypes_project.generate(project_dir) + + # build the wheels + actual_wheels = utils.cibuildwheel_run( + project_dir, + add_env={ + "CIBW_TEST_REQUIRES": "pytest", + "CIBW_TEST_COMMAND": "pytest {project}/test", + # limit the number of builds for test performance reasons + "CIBW_BUILD": "cp38-* cp310-* pp39-*", + }, + ) + + # check that the expected wheels are produced + expected_wheels = utils.expected_wheels("ctypesexample", "1.0.0", python_abi_tags=["py3-none"]) + assert set(actual_wheels) == set(expected_wheels) + + # check that each wheel was built once, and reused + captured = capfd.readouterr() + assert "Building wheel..." in captured.out + assert "Found previously built wheel" in captured.out diff --git a/test/test_limited_api.py b/test/test_limited_api.py deleted file mode 100644 index ea173bf5..00000000 --- a/test/test_limited_api.py +++ /dev/null @@ -1,50 +0,0 @@ -import textwrap - -from . import test_projects, utils - -limited_api_project = test_projects.new_c_project( - setup_py_add=textwrap.dedent( - r""" - cmdclass = {} - extension_kwargs = {} - if sys.version_info[:2] >= (3, 8): - from wheel.bdist_wheel import bdist_wheel as _bdist_wheel - - class bdist_wheel_abi3(_bdist_wheel): - def finalize_options(self): - _bdist_wheel.finalize_options(self) - self.root_is_pure = False - - def get_tag(self): - python, abi, plat = _bdist_wheel.get_tag(self) - return python, "abi3", plat - - cmdclass["bdist_wheel"] = bdist_wheel_abi3 - extension_kwargs["define_macros"] = [("Py_LIMITED_API", "0x03080000")] - extension_kwargs["py_limited_api"] = True - """ - ), - setup_py_extension_args_add="**extension_kwargs", - setup_py_setup_args_add="cmdclass=cmdclass", -) - - -def test(tmp_path): - project_dir = tmp_path / "project" - limited_api_project.generate(project_dir) - - # build the wheels - actual_wheels = utils.cibuildwheel_run( - project_dir, - add_env={ - "CIBW_SKIP": "pp* ", # PyPy does not have a Py_LIMITED_API equivalent - }, - ) - - # check that the expected wheels are produced - expected_wheels = [ - w.replace("cp38-cp38", "cp38-abi3") - for w in utils.expected_wheels("spam", "0.1.0") - if "-pp" not in w and "-cp39" not in w and "-cp310" not in w and "-cp311" not in w - ] - assert set(actual_wheels) == set(expected_wheels) diff --git a/test/utils.py b/test/utils.py index b6212021..d325be68 100644 --- a/test/utils.py +++ b/test/utils.py @@ -113,6 +113,7 @@ def expected_wheels( musllinux_versions=None, macosx_deployment_target="10.9", machine_arch=None, + python_abi_tags=None, ): """ Returns a list of expected wheels from a run of cibuildwheel. @@ -139,21 +140,22 @@ def expected_wheels( if musllinux_versions is None: musllinux_versions = ["musllinux_1_1"] - python_abi_tags = [ - "cp36-cp36m", - "cp37-cp37m", - "cp38-cp38", - "cp39-cp39", - "cp310-cp310", - "cp311-cp311", - ] + if python_abi_tags is None: + python_abi_tags = [ + "cp36-cp36m", + "cp37-cp37m", + "cp38-cp38", + "cp39-cp39", + "cp310-cp310", + "cp311-cp311", + ] - if machine_arch in ["x86_64", "AMD64", "x86", "aarch64"]: - python_abi_tags += ["pp37-pypy37_pp73", "pp38-pypy38_pp73", "pp39-pypy39_pp73"] + if machine_arch in ["x86_64", "AMD64", "x86", "aarch64"]: + python_abi_tags += ["pp37-pypy37_pp73", "pp38-pypy38_pp73", "pp39-pypy39_pp73"] - if platform == "macos" and machine_arch == "arm64": - # currently, arm64 macs are only supported by cp39, cp310 & cp311 - python_abi_tags = ["cp39-cp39", "cp310-cp310", "cp311-cp311"] + if platform == "macos" and machine_arch == "arm64": + # currently, arm64 macs are only supported by cp39, cp310 & cp311 + python_abi_tags = ["cp39-cp39", "cp310-cp310", "cp311-cp311"] wheels = [] @@ -185,10 +187,10 @@ def expected_wheels( ) elif platform == "windows": - if python_abi_tag.startswith("cp"): - platform_tags = ["win32", "win_amd64"] - else: + if python_abi_tag.startswith("pp"): platform_tags = ["win_amd64"] + else: + platform_tags = ["win32", "win_amd64"] elif platform == "macos": if python_abi_tag == "cp39-cp39" and machine_arch == "arm64": diff --git a/unit_test/utils_test.py b/unit_test/utils_test.py index 41e376fa..7f949a73 100644 --- a/unit_test/utils_test.py +++ b/unit_test/utils_test.py @@ -1,4 +1,8 @@ -from cibuildwheel.util import format_safe, prepare_command +from pathlib import PurePath + +import pytest + +from cibuildwheel.util import find_compatible_wheel, format_safe, prepare_command def test_format_safe(): @@ -46,3 +50,41 @@ def test_prepare_command(): prepare_command("{a}{a,b}{b:.2e}{c}{d%s}{e:3}{f[0]}", a="42", b="3.14159") == "42{a,b}{b:.2e}{c}{d%s}{e:3}{f[0]}" ) + + +@pytest.mark.parametrize( + "wheel,identifier", + ( + ("foo-0.1-cp38-abi3-win_amd64.whl", "cp310-win_amd64"), + ("foo-0.1-cp38-abi3-macosx_11_0_x86_64.whl", "cp310-macosx_x86_64"), + ("foo-0.1-cp38-abi3-manylinux2014_x86_64.whl", "cp310-manylinux_x86_64"), + ("foo-0.1-cp38-abi3-musllinux_1_1_x86_64.whl", "cp310-musllinux_x86_64"), + ("foo-0.1-py2.py3-none-win_amd64.whl", "cp310-win_amd64"), + ("foo-0.1-py2.py3-none-win_amd64.whl", "pp310-win_amd64"), + ("foo-0.1-py3-none-win_amd64.whl", "cp310-win_amd64"), + ("foo-0.1-py38-none-win_amd64.whl", "cp310-win_amd64"), + ("foo-0.1-py38-none-win_amd64.whl", "pp310-win_amd64"), + ), +) +def test_find_compatible_wheel_found(wheel: str, identifier: str): + wheel_ = PurePath(wheel) + found = find_compatible_wheel([wheel_], identifier) + assert found is wheel_ + + +@pytest.mark.parametrize( + "wheel,identifier", + ( + ("foo-0.1-cp38-abi3-win_amd64.whl", "cp310-win32"), + ("foo-0.1-cp38-abi3-win_amd64.whl", "cp37-win_amd64"), + ("foo-0.1-cp38-abi3-macosx_11_0_x86_64.whl", "cp310-macosx_universal2"), + ("foo-0.1-cp38-abi3-manylinux2014_x86_64.whl", "cp310-musllinux_x86_64"), + ("foo-0.1-cp38-abi3-musllinux_1_1_x86_64.whl", "cp310-manylinux_x86_64"), + ("foo-0.1-py2-none-win_amd64.whl", "cp310-win_amd64"), + ("foo-0.1-py38-none-win_amd64.whl", "cp37-win_amd64"), + ("foo-0.1-py38-none-win_amd64.whl", "pp37-win_amd64"), + ("foo-0.1-cp38-cp38-win_amd64.whl", "cp310-win_amd64"), + ), +) +def test_find_compatible_wheel_not_found(wheel: str, identifier: str): + assert find_compatible_wheel([PurePath(wheel)], identifier) is None From d02366f547da8b363d9bd2cf3bdefc7f17090cc8 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Sun, 3 Jul 2022 19:00:19 +0100 Subject: [PATCH 8/8] fix: multiple version tags per release bug in release tooling (#1166) --- bin/bump_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/bump_version.py b/bin/bump_version.py index 7e2b1b30..cab036ca 100755 --- a/bin/bump_version.py +++ b/bin/bump_version.py @@ -184,7 +184,7 @@ def bump_version() -> None: print() release_url = "https://github.com/pypa/cibuildwheel/releases/new?" + urllib.parse.urlencode( - {"tag": new_version} + {"tag": f"v{new_version}"} ) print("Then create a release at the URL:") print(f" {release_url}")