Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51f5c7fe68 | ||
|
|
8499628a5b | ||
|
|
b2bc6fdda6 | ||
|
|
754a47388d | ||
|
|
f25c8a64f6 | ||
|
|
9b904777d4 | ||
|
|
e14b8e8e2f | ||
|
|
da9be0a27b | ||
|
|
301dca264f | ||
|
|
c74083cfda | ||
|
|
d16375e101 | ||
|
|
abc10b603b | ||
|
|
4a7aeffbf5 | ||
|
|
6bf13bff03 | ||
|
|
3486f0f207 | ||
|
|
580205affc | ||
|
|
2afeca62a1 | ||
|
|
bf5db55bfa | ||
|
|
e56b444cd8 | ||
|
|
5fdbbcbe3a | ||
|
|
635c64eeb7 | ||
|
|
f29da13c2c | ||
|
|
290a55097d | ||
|
|
bda7ff6351 | ||
|
|
da2726449c | ||
|
|
4b88d36b20 | ||
|
|
58c647acf0 | ||
|
|
7a7e53e8d4 | ||
|
|
5cb0964111 | ||
|
|
de419eef44 | ||
|
|
d7759bf876 | ||
|
|
2bd344260e | ||
|
|
c2fb0e4e96 | ||
|
|
00f6526ff5 | ||
|
|
7efc7dbb91 | ||
|
|
ba4a993591 | ||
|
|
f8ef7fa826 | ||
|
|
5e15bb25b4 | ||
|
|
52572ccdd0 | ||
|
|
c6027e4fc7 | ||
|
|
aff6dd5adc | ||
|
|
31bd9c9174 | ||
|
|
d996af554a | ||
|
|
e42f243b52 |
@@ -27,6 +27,9 @@ jobs:
|
||||
needs: [dist]
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
environment: pypi
|
||||
permissions:
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- uses: actions/download-artifact@v3
|
||||
@@ -34,7 +37,4 @@ jobs:
|
||||
name: artifact
|
||||
path: dist
|
||||
|
||||
- uses: pypa/gh-action-pypi-publish@v1.8.5
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.pypi_password }}
|
||||
- uses: pypa/gh-action-pypi-publish@release/v1
|
||||
|
||||
@@ -39,6 +39,9 @@ jobs:
|
||||
matrix:
|
||||
os: [ubuntu-20.04, windows-latest, macos-11]
|
||||
python_version: ['3.11']
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
python_version: '3.7'
|
||||
timeout-minutes: 180
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
@@ -22,9 +22,9 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: wntrblm/nox@2022.11.21
|
||||
- uses: wntrblm/nox@2023.04.22
|
||||
with:
|
||||
python-versions: "3.6, 3.7, 3.8, 3.9, 3.10, 3.11"
|
||||
python-versions: "3.7, 3.8, 3.9, 3.10, 3.11, 3.12-dev"
|
||||
|
||||
- name: "Run update: dependencies"
|
||||
run: nox --force-color -s update_constraints
|
||||
|
||||
@@ -19,7 +19,7 @@ repos:
|
||||
- id: black
|
||||
|
||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||
rev: v0.0.261
|
||||
rev: v0.0.269
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: ["--fix", "--show-fixes"]
|
||||
@@ -31,7 +31,7 @@ repos:
|
||||
args: [--include-version-classifiers, --max-py-version=3.11]
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.2.0
|
||||
rev: v1.3.0
|
||||
hooks:
|
||||
- id: mypy
|
||||
name: mypy 3.7 on cibuildwheel/
|
||||
|
||||
@@ -31,6 +31,7 @@ What does it do?
|
||||
| CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅³ | ✅ | ✅ | ✅ | ✅ |
|
||||
| CPython 3.10 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| CPython 3.11 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| CPython 3.12⁵ | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| PyPy 3.7 v7.3 | ✅ | N/A | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A |
|
||||
| PyPy 3.8 v7.3 | ✅ | ✅⁴ | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A |
|
||||
| PyPy 3.9 v7.3 | ✅ | ✅⁴ | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A |
|
||||
@@ -39,6 +40,7 @@ What does it do?
|
||||
<sup>² Windows arm64 support is experimental.</sup><br>
|
||||
<sup>³ Alpine 3.14 and very briefly 3.15's default python3 [was not able to load](https://github.com/pypa/cibuildwheel/issues/934) musllinux wheels. This has been fixed; please upgrade the python package if using Alpine from before the fix.</sup><br>
|
||||
<sup>⁴ Cross-compilation not supported with PyPy - to build these wheels you need to run cibuildwheel on an Apple Silicon machine.</sup><br>
|
||||
<sup>⁵ CPython 3.12 is available using the [CIBW_PRERELEASE_PYTHONS](https://cibuildwheel.readthedocs.io/en/stable/options/#prerelease-pythons) option.</sup><br>
|
||||
|
||||
- Builds manylinux, musllinux, macOS 10.9+, and Windows wheels for CPython and PyPy
|
||||
- Works on GitHub Actions, Azure Pipelines, Travis CI, AppVeyor, CircleCI, GitLab CI, and Cirrus CI
|
||||
@@ -94,7 +96,7 @@ jobs:
|
||||
- uses: actions/setup-python@v3
|
||||
|
||||
- name: Install cibuildwheel
|
||||
run: python -m pip install cibuildwheel==2.12.2
|
||||
run: python -m pip install cibuildwheel==2.13.0
|
||||
|
||||
- name: Build wheels
|
||||
run: python -m cibuildwheel --output-dir wheelhouse
|
||||
@@ -163,8 +165,8 @@ Here are some repos that use cibuildwheel.
|
||||
| [Tornado][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. |
|
||||
| [Matplotlib][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The venerable Matplotlib, a Python library with C++ portions |
|
||||
| [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform |
|
||||
| [Kivy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS |
|
||||
| [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. |
|
||||
| [Kivy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS |
|
||||
| [MyPy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | The compiled version of MyPy using MyPyC. |
|
||||
| [MemRay][] | ![github icon][] | ![linux icon][] | Memray is a memory profiler for Python |
|
||||
|
||||
@@ -174,8 +176,8 @@ Here are some repos that use cibuildwheel.
|
||||
[Tornado]: https://github.com/tornadoweb/tornado
|
||||
[Matplotlib]: https://github.com/matplotlib/matplotlib
|
||||
[NCNN]: https://github.com/Tencent/ncnn
|
||||
[Kivy]: https://github.com/kivy/kivy
|
||||
[Prophet]: https://github.com/facebook/prophet
|
||||
[Kivy]: https://github.com/kivy/kivy
|
||||
[MyPy]: https://github.com/mypyc/mypy_mypyc-wheels
|
||||
[MemRay]: https://github.com/bloomberg/memray
|
||||
|
||||
@@ -210,6 +212,22 @@ Changelog
|
||||
|
||||
<!-- this section was generated by bin/update_readme_changelog.py -- do not edit manually -->
|
||||
|
||||
### v2.13.0
|
||||
|
||||
_28 May 2023_
|
||||
|
||||
- ✨ Adds CPython 3.12 support, under the prerelease flag [CIBW_PRERELEASE_PYTHONS](https://cibuildwheel.readthedocs.io/en/stable/options/#prerelease-pythons). This version of cibuildwheel uses 3.12.0b1.
|
||||
|
||||
While CPython is in beta, the ABI can change, so your wheels might not be compatible with the final release. For this reason, we don't recommend distributing wheels until RC1, at which point 3.12 will be available in cibuildwheel without the flag. (#1507)
|
||||
|
||||
- ✨ Adds the ability to pass arguments to the container engine when the container is created, using the [CIBW_CONTAINER_ENGINE](https://cibuildwheel.readthedocs.io/en/stable/options/#container-engine) option. (#1499)
|
||||
|
||||
### v2.12.3
|
||||
|
||||
_19 April 2023_
|
||||
|
||||
- 🐛 Fix an import error when running on Python 3.7. (#1479)
|
||||
|
||||
### v2.12.2
|
||||
|
||||
_18 April 2023_
|
||||
@@ -231,23 +249,6 @@ _16 Jan 2023_
|
||||
- ✨ Adds support for PyPy arm64 wheels. This means that you can build PyPy wheels for Apple Silicon machines. Cross-compilation is not supported for these wheels, so you'll have to build on an Apple Silicon machine. (#1372)
|
||||
- 🛠 Pinned version updates, including PyPy to v7.3.11 and setuptools to 66.0.0.
|
||||
|
||||
### v2.11.4
|
||||
|
||||
_24 Dec 2022_
|
||||
|
||||
- 🐛 Fix a bug that caused missing wheels on Windows when a test was skipped using CIBW_TEST_SKIP (#1377)
|
||||
- 🛠 Updates CPython 3.11 to 3.11.1 (#1371)
|
||||
- 🛠 Updates PyPy to 7.3.10, except on macOS which remains on 7.3.9 due to a bug on that platform. (#1371)
|
||||
- 📚 Added a reference to abi3audit to the docs (#1347)
|
||||
|
||||
### v2.11.3
|
||||
|
||||
_5 Dec 2022_
|
||||
|
||||
- ✨ Improves the 'build options' log output that's printed at the start of each run (#1352)
|
||||
- ✨ Added a friendly error message to a common misconfiguration of the `CIBW_TEST_COMMAND` option - not specifying path using the `{project}` placeholder (#1336)
|
||||
- 🛠 The GitHub Action now uses Powershell on Windows to avoid occasional incompabilities with bash (#1346)
|
||||
|
||||
<!-- END bin/update_readme_changelog.py -->
|
||||
|
||||
---
|
||||
|
||||
@@ -5,7 +5,6 @@ from __future__ import annotations
|
||||
import copy
|
||||
import difflib
|
||||
import logging
|
||||
import sys
|
||||
from collections.abc import Mapping, MutableMapping
|
||||
from pathlib import Path
|
||||
from typing import Any, Union
|
||||
@@ -13,19 +12,14 @@ from typing import Any, Union
|
||||
import click
|
||||
import requests
|
||||
import rich
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
import tomllib
|
||||
else:
|
||||
import tomli as tomllib
|
||||
|
||||
from packaging.specifiers import Specifier
|
||||
from packaging.version import Version
|
||||
from rich.logging import RichHandler
|
||||
from rich.syntax import Syntax
|
||||
|
||||
from cibuildwheel._compat import tomllib
|
||||
from cibuildwheel._compat.typing import Final, Literal, TypedDict
|
||||
from cibuildwheel.extra import dump_python_configurations
|
||||
from cibuildwheel.typing import Final, Literal, TypedDict
|
||||
|
||||
log = logging.getLogger("cibw")
|
||||
|
||||
|
||||
@@ -5,23 +5,17 @@ from __future__ import annotations
|
||||
import difflib
|
||||
import logging
|
||||
import subprocess
|
||||
import sys
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
|
||||
import click
|
||||
import rich
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
import tomllib
|
||||
else:
|
||||
import tomli as tomllib
|
||||
|
||||
from packaging.version import InvalidVersion, Version
|
||||
from rich.logging import RichHandler
|
||||
from rich.syntax import Syntax
|
||||
|
||||
from cibuildwheel.typing import Final
|
||||
from cibuildwheel._compat import tomllib
|
||||
from cibuildwheel._compat.typing import Final
|
||||
|
||||
log = logging.getLogger("cibw")
|
||||
|
||||
@@ -59,6 +53,10 @@ def git_ls_remote_versions(url) -> list[VersionTuple]:
|
||||
if version.is_prerelease:
|
||||
log.info("Ignoring pre-release %r", str(version))
|
||||
continue
|
||||
# Do not upgrade past 20.22.0 to keep python 3.6 compat
|
||||
if version >= Version("20.22.0"):
|
||||
log.info("Ignoring %r which is not compatible with python 3.6", str(version))
|
||||
continue
|
||||
versions.append(VersionTuple(version, version_string))
|
||||
except InvalidVersion:
|
||||
log.warning("Ignoring ref %r", ref)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
from __future__ import annotations
|
||||
|
||||
__version__ = "2.12.2"
|
||||
__version__ = "2.13.0"
|
||||
|
||||
@@ -16,15 +16,11 @@ import cibuildwheel.linux
|
||||
import cibuildwheel.macos
|
||||
import cibuildwheel.util
|
||||
import cibuildwheel.windows
|
||||
from cibuildwheel._compat.typing import Protocol, assert_never
|
||||
from cibuildwheel.architecture import Architecture, allowed_architectures_check
|
||||
from cibuildwheel.logger import log
|
||||
from cibuildwheel.options import CommandLineArguments, Options, compute_options
|
||||
from cibuildwheel.typing import (
|
||||
PLATFORMS,
|
||||
GenericPythonConfiguration,
|
||||
PlatformName,
|
||||
assert_never,
|
||||
)
|
||||
from cibuildwheel.typing import PLATFORMS, GenericPythonConfiguration, PlatformName
|
||||
from cibuildwheel.util import (
|
||||
CIBW_CACHE_PATH,
|
||||
BuildSelector,
|
||||
@@ -244,7 +240,7 @@ def _compute_platform(args: CommandLineArguments) -> PlatformName:
|
||||
return _compute_platform_ci()
|
||||
|
||||
|
||||
class PlatformModule(typing.Protocol):
|
||||
class PlatformModule(Protocol):
|
||||
# note that as per PEP544, the self argument is ignored when the protocol
|
||||
# is applied to a module
|
||||
def get_python_configurations(
|
||||
@@ -264,7 +260,7 @@ def get_platform_module(platform: PlatformName) -> PlatformModule:
|
||||
return cibuildwheel.windows
|
||||
if platform == "macos":
|
||||
return cibuildwheel.macos
|
||||
assert_never(platform) # noqa: RET503
|
||||
assert_never(platform)
|
||||
|
||||
|
||||
def build_in_directory(args: CommandLineArguments) -> None:
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
from __future__ import annotations
|
||||
@@ -0,0 +1,10 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
from functools import cached_property
|
||||
else:
|
||||
from ._functools_cached_property_38 import cached_property
|
||||
|
||||
__all__ = ("cached_property",)
|
||||
@@ -0,0 +1,10 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
from tomllib import load # noqa: TID251
|
||||
else:
|
||||
from tomli import load # noqa: TID251
|
||||
|
||||
__all__ = ("load",)
|
||||
@@ -0,0 +1,24 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
||||
if sys.version_info < (3, 8):
|
||||
from typing_extensions import Final, Literal, OrderedDict, Protocol, TypedDict
|
||||
else:
|
||||
from typing import Final, Literal, OrderedDict, Protocol, TypedDict # noqa: TID251
|
||||
|
||||
if sys.version_info < (3, 11):
|
||||
from typing_extensions import NotRequired, assert_never
|
||||
else:
|
||||
from typing import NotRequired, assert_never # noqa: TID251
|
||||
|
||||
__all__ = (
|
||||
"Final",
|
||||
"Literal",
|
||||
"Protocol",
|
||||
"Protocol",
|
||||
"TypedDict",
|
||||
"OrderedDict",
|
||||
"assert_never",
|
||||
"NotRequired",
|
||||
)
|
||||
@@ -7,9 +7,14 @@ import sys
|
||||
from collections.abc import Set
|
||||
from enum import Enum
|
||||
|
||||
from .typing import Final, Literal, PlatformName, assert_never
|
||||
from ._compat.typing import Final, Literal, assert_never
|
||||
from .typing import PlatformName
|
||||
|
||||
PRETTY_NAMES: Final = {"linux": "Linux", "macos": "macOS", "windows": "Windows"}
|
||||
PRETTY_NAMES: Final[dict[PlatformName, str]] = {
|
||||
"linux": "Linux",
|
||||
"macos": "macOS",
|
||||
"windows": "Windows",
|
||||
}
|
||||
|
||||
ARCH_SYNONYMS: Final[list[dict[PlatformName, str | None]]] = [
|
||||
{"linux": "x86_64", "macos": "x86_64", "windows": "AMD64"},
|
||||
|
||||
@@ -7,9 +7,8 @@ from typing import Any
|
||||
import bashlex
|
||||
import bashlex.errors
|
||||
|
||||
from cibuildwheel.typing import Protocol
|
||||
|
||||
from . import bashlex_eval
|
||||
from ._compat.typing import Protocol
|
||||
|
||||
|
||||
class EnvironmentParseError(Exception):
|
||||
|
||||
@@ -7,7 +7,7 @@ from __future__ import annotations
|
||||
from collections.abc import Mapping, Sequence
|
||||
from io import StringIO
|
||||
|
||||
from .typing import Protocol
|
||||
from ._compat.typing import Protocol
|
||||
|
||||
__all__ = ("Printable", "dump_python_configurations")
|
||||
|
||||
|
||||
@@ -8,11 +8,12 @@ from dataclasses import dataclass
|
||||
from pathlib import Path, PurePath, PurePosixPath
|
||||
from typing import Tuple
|
||||
|
||||
from ._compat.typing import OrderedDict, assert_never
|
||||
from .architecture import Architecture
|
||||
from .logger import log
|
||||
from .oci_container import OCIContainer
|
||||
from .options import Options
|
||||
from .typing import OrderedDict, PathOrStr, assert_never
|
||||
from .typing import PathOrStr
|
||||
from .util import (
|
||||
AlreadyBuiltWheelError,
|
||||
BuildSelector,
|
||||
@@ -378,7 +379,9 @@ def build(options: Options, tmp_path: Path) -> None: # noqa: ARG001
|
||||
try:
|
||||
# check the container engine is installed
|
||||
subprocess.run(
|
||||
[options.globals.container_engine, "--version"], check=True, stdout=subprocess.DEVNULL
|
||||
[options.globals.container_engine.name, "--version"],
|
||||
check=True,
|
||||
stdout=subprocess.DEVNULL,
|
||||
)
|
||||
except subprocess.CalledProcessError:
|
||||
print(
|
||||
|
||||
@@ -5,19 +5,20 @@ import os
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
from typing import IO, AnyStr
|
||||
from typing import IO, AnyStr, Tuple
|
||||
|
||||
from cibuildwheel.typing import Final
|
||||
from cibuildwheel.util import CIProvider, detect_ci_provider
|
||||
from ._compat.typing import Final
|
||||
from .util import CIProvider, detect_ci_provider
|
||||
|
||||
DEFAULT_FOLD_PATTERN: Final = ("{name}", "")
|
||||
FOLD_PATTERNS: Final = {
|
||||
FoldPattern = Tuple[str, str]
|
||||
DEFAULT_FOLD_PATTERN: Final[FoldPattern] = ("{name}", "")
|
||||
FOLD_PATTERNS: Final[dict[str, FoldPattern]] = {
|
||||
"azure": ("##[group]{name}", "##[endgroup]"),
|
||||
"travis": ("travis_fold:start:{identifier}\n{name}", "travis_fold:end:{identifier}"),
|
||||
"github": ("::group::{name}", "::endgroup::{name}"),
|
||||
}
|
||||
|
||||
PLATFORM_IDENTIFIER_DESCRIPTIONS: Final = {
|
||||
PLATFORM_IDENTIFIER_DESCRIPTIONS: Final[dict[str, str]] = {
|
||||
"manylinux_x86_64": "manylinux x86_64",
|
||||
"manylinux_i686": "manylinux i686",
|
||||
"manylinux_aarch64": "manylinux aarch64",
|
||||
|
||||
@@ -16,11 +16,12 @@ from typing import Tuple
|
||||
|
||||
from filelock import FileLock
|
||||
|
||||
from ._compat.typing import Literal, assert_never
|
||||
from .architecture import Architecture
|
||||
from .environment import ParsedEnvironment
|
||||
from .logger import log
|
||||
from .options import Options
|
||||
from .typing import Literal, PathOrStr, assert_never
|
||||
from .typing import PathOrStr
|
||||
from .util import (
|
||||
CIBW_CACHE_PATH,
|
||||
AlreadyBuiltWheelError,
|
||||
|
||||
@@ -11,15 +11,44 @@ import sys
|
||||
import typing
|
||||
import uuid
|
||||
from collections.abc import Mapping, Sequence
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path, PurePath, PurePosixPath
|
||||
from types import TracebackType
|
||||
from typing import IO, Dict
|
||||
|
||||
from cibuildwheel.util import CIProvider, detect_ci_provider
|
||||
from ._compat.typing import Literal
|
||||
from .typing import PathOrStr, PopenBytes
|
||||
from .util import CIProvider, detect_ci_provider, parse_key_value_string
|
||||
|
||||
from .typing import Literal, PathOrStr, PopenBytes
|
||||
ContainerEngineName = Literal["docker", "podman"]
|
||||
|
||||
ContainerEngine = Literal["docker", "podman"]
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class OCIContainerEngineConfig:
|
||||
name: ContainerEngineName
|
||||
create_args: Sequence[str] = ()
|
||||
|
||||
@staticmethod
|
||||
def from_config_string(config_string: str) -> OCIContainerEngineConfig:
|
||||
config_dict = parse_key_value_string(config_string, ["name"])
|
||||
name = " ".join(config_dict["name"])
|
||||
if name not in {"docker", "podman"}:
|
||||
msg = f"unknown container engine {name}"
|
||||
raise ValueError(msg)
|
||||
|
||||
name = typing.cast(ContainerEngineName, name)
|
||||
# some flexibility in the option name to cope with TOML conventions
|
||||
create_args = config_dict.get("create_args") or config_dict.get("create-args") or []
|
||||
return OCIContainerEngineConfig(name=name, create_args=create_args)
|
||||
|
||||
def options_summary(self) -> str | dict[str, str]:
|
||||
if not self.create_args:
|
||||
return self.name
|
||||
else:
|
||||
return {"name": self.name, "create_args": repr(self.create_args)}
|
||||
|
||||
|
||||
DEFAULT_ENGINE = OCIContainerEngineConfig("docker")
|
||||
|
||||
|
||||
class OCIContainer:
|
||||
@@ -57,7 +86,7 @@ class OCIContainer:
|
||||
image: str,
|
||||
simulate_32_bit: bool = False,
|
||||
cwd: PathOrStr | None = None,
|
||||
engine: ContainerEngine = "docker",
|
||||
engine: OCIContainerEngineConfig = DEFAULT_ENGINE,
|
||||
):
|
||||
if not image:
|
||||
msg = "Must have a non-empty image to run."
|
||||
@@ -84,13 +113,14 @@ class OCIContainer:
|
||||
|
||||
subprocess.run(
|
||||
[
|
||||
self.engine,
|
||||
self.engine.name,
|
||||
"create",
|
||||
"--env=CIBUILDWHEEL",
|
||||
f"--name={self.name}",
|
||||
"--interactive",
|
||||
"--volume=/:/host", # ignored on CircleCI
|
||||
*network_args,
|
||||
*self.engine.create_args,
|
||||
self.image,
|
||||
*shell_args,
|
||||
],
|
||||
@@ -99,7 +129,7 @@ class OCIContainer:
|
||||
|
||||
self.process = subprocess.Popen(
|
||||
[
|
||||
self.engine,
|
||||
self.engine.name,
|
||||
"start",
|
||||
"--attach",
|
||||
"--interactive",
|
||||
@@ -137,7 +167,7 @@ class OCIContainer:
|
||||
self.bash_stdin.close()
|
||||
self.bash_stdout.close()
|
||||
|
||||
if self.engine == "podman":
|
||||
if self.engine.name == "podman":
|
||||
# This works around what seems to be a race condition in the podman
|
||||
# backend. The full reason is not understood. See PR #966 for a
|
||||
# discussion on possible causes and attempts to remove this line.
|
||||
@@ -147,7 +177,7 @@ class OCIContainer:
|
||||
assert isinstance(self.name, str)
|
||||
|
||||
subprocess.run(
|
||||
[self.engine, "rm", "--force", "-v", self.name],
|
||||
[self.engine.name, "rm", "--force", "-v", self.name],
|
||||
stdout=subprocess.DEVNULL,
|
||||
check=False,
|
||||
)
|
||||
@@ -162,7 +192,7 @@ class OCIContainer:
|
||||
if from_path.is_dir():
|
||||
self.call(["mkdir", "-p", to_path])
|
||||
subprocess.run(
|
||||
f"tar cf - . | {self.engine} exec -i {self.name} tar --no-same-owner -xC {shell_quote(to_path)} -f -",
|
||||
f"tar cf - . | {self.engine.name} exec -i {self.name} tar --no-same-owner -xC {shell_quote(to_path)} -f -",
|
||||
shell=True,
|
||||
check=True,
|
||||
cwd=from_path,
|
||||
@@ -171,7 +201,7 @@ class OCIContainer:
|
||||
exec_process: subprocess.Popen[bytes]
|
||||
with subprocess.Popen(
|
||||
[
|
||||
self.engine,
|
||||
self.engine.name,
|
||||
"exec",
|
||||
"-i",
|
||||
str(self.name),
|
||||
@@ -198,10 +228,10 @@ class OCIContainer:
|
||||
# note: we assume from_path is a dir
|
||||
to_path.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
if self.engine == "podman":
|
||||
if self.engine.name == "podman":
|
||||
subprocess.run(
|
||||
[
|
||||
self.engine,
|
||||
self.engine.name,
|
||||
"cp",
|
||||
f"{self.name}:{from_path}/.",
|
||||
str(to_path),
|
||||
@@ -209,10 +239,10 @@ class OCIContainer:
|
||||
check=True,
|
||||
cwd=to_path,
|
||||
)
|
||||
elif self.engine == "docker":
|
||||
elif self.engine.name == "docker":
|
||||
# There is a bug in docker that prevents a simple 'cp' invocation
|
||||
# from working https://github.com/moby/moby/issues/38995
|
||||
command = f"{self.engine} exec -i {self.name} tar -cC {shell_quote(from_path)} -f - . | tar -xf -"
|
||||
command = f"{self.engine.name} exec -i {self.name} tar -cC {shell_quote(from_path)} -f - . | tar -xf -"
|
||||
subprocess.run(
|
||||
command,
|
||||
shell=True,
|
||||
@@ -220,7 +250,7 @@ class OCIContainer:
|
||||
cwd=to_path,
|
||||
)
|
||||
else:
|
||||
raise KeyError(self.engine)
|
||||
raise KeyError(self.engine.name)
|
||||
|
||||
def glob(self, path: PurePosixPath, pattern: str) -> list[PurePosixPath]:
|
||||
glob_pattern = path.joinpath(pattern)
|
||||
@@ -338,10 +368,10 @@ class OCIContainer:
|
||||
return self.call(command, env=environment, capture_output=True)
|
||||
|
||||
def debug_info(self) -> str:
|
||||
if self.engine == "podman":
|
||||
command = f"{self.engine} info --debug"
|
||||
if self.engine.name == "podman":
|
||||
command = f"{self.engine.name} info --debug"
|
||||
else:
|
||||
command = f"{self.engine} info"
|
||||
command = f"{self.engine.name} info"
|
||||
completed = subprocess.run(
|
||||
command,
|
||||
shell=True,
|
||||
|
||||
+18
-14
@@ -10,24 +10,20 @@ import shlex
|
||||
import sys
|
||||
import textwrap
|
||||
import traceback
|
||||
import typing
|
||||
from collections.abc import Callable, Generator, Iterable, Iterator, Mapping, Set
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, List, Union
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
import tomllib
|
||||
else:
|
||||
import tomli as tomllib
|
||||
|
||||
from packaging.specifiers import SpecifierSet
|
||||
|
||||
from ._compat import tomllib
|
||||
from ._compat.typing import Literal, NotRequired, TypedDict
|
||||
from .architecture import Architecture
|
||||
from .environment import EnvironmentParseError, ParsedEnvironment, parse_environment
|
||||
from .logger import log
|
||||
from .oci_container import ContainerEngine
|
||||
from .oci_container import OCIContainerEngineConfig
|
||||
from .projectfiles import get_requires_python_str
|
||||
from .typing import PLATFORMS, Literal, NotRequired, PlatformName, TypedDict
|
||||
from .typing import PLATFORMS, PlatformName
|
||||
from .util import (
|
||||
MANYLINUX_ARCHS,
|
||||
MUSLLINUX_ARCHS,
|
||||
@@ -78,7 +74,7 @@ class GlobalOptions:
|
||||
build_selector: BuildSelector
|
||||
test_selector: TestSelector
|
||||
architectures: set[Architecture]
|
||||
container_engine: ContainerEngine
|
||||
container_engine: OCIContainerEngineConfig
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
@@ -139,8 +135,14 @@ DISALLOWED_OPTIONS = {
|
||||
|
||||
|
||||
class TableFmt(TypedDict):
|
||||
# a format string, used with '.format', with `k` and `v` parameters
|
||||
# e.g. "{k}={v}"
|
||||
item: str
|
||||
# the string that is inserted between items
|
||||
# e.g. " "
|
||||
sep: str
|
||||
# a quoting function that, if supplied, is called to quote each value
|
||||
# e.g. shlex.quote
|
||||
quote: NotRequired[Callable[[str], str]]
|
||||
|
||||
|
||||
@@ -457,15 +459,17 @@ class Options:
|
||||
)
|
||||
test_selector = TestSelector(skip_config=test_skip)
|
||||
|
||||
container_engine_str = self.reader.get("container-engine")
|
||||
container_engine_str = self.reader.get(
|
||||
"container-engine", table={"item": "{k}:{v}", "sep": "; ", "quote": shlex.quote}
|
||||
)
|
||||
|
||||
if container_engine_str not in ["docker", "podman"]:
|
||||
msg = f"cibuildwheel: Unrecognised container_engine {container_engine_str!r}, only 'docker' and 'podman' are supported"
|
||||
try:
|
||||
container_engine = OCIContainerEngineConfig.from_config_string(container_engine_str)
|
||||
except ValueError as e:
|
||||
msg = f"cibuildwheel: Failed to parse container config. {e}"
|
||||
print(msg, file=sys.stderr)
|
||||
sys.exit(2)
|
||||
|
||||
container_engine = typing.cast(ContainerEngine, container_engine_str)
|
||||
|
||||
return GlobalOptions(
|
||||
package_dir=package_dir,
|
||||
output_dir=output_dir,
|
||||
|
||||
@@ -7,10 +7,7 @@ import sys
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
import tomllib
|
||||
else:
|
||||
import tomli as tomllib
|
||||
from ._compat import tomllib
|
||||
|
||||
if sys.version_info < (3, 8):
|
||||
Constant = ast.Str
|
||||
|
||||
@@ -6,12 +6,14 @@ python_configurations = [
|
||||
{ identifier = "cp39-manylinux_x86_64", version = "3.9", path_str = "/opt/python/cp39-cp39" },
|
||||
{ identifier = "cp310-manylinux_x86_64", version = "3.10", path_str = "/opt/python/cp310-cp310" },
|
||||
{ identifier = "cp311-manylinux_x86_64", version = "3.11", path_str = "/opt/python/cp311-cp311" },
|
||||
{ identifier = "cp312-manylinux_x86_64", version = "3.12", path_str = "/opt/python/cp312-cp312" },
|
||||
{ identifier = "cp36-manylinux_i686", version = "3.6", path_str = "/opt/python/cp36-cp36m" },
|
||||
{ identifier = "cp37-manylinux_i686", version = "3.7", path_str = "/opt/python/cp37-cp37m" },
|
||||
{ identifier = "cp38-manylinux_i686", version = "3.8", path_str = "/opt/python/cp38-cp38" },
|
||||
{ identifier = "cp39-manylinux_i686", version = "3.9", path_str = "/opt/python/cp39-cp39" },
|
||||
{ identifier = "cp310-manylinux_i686", version = "3.10", path_str = "/opt/python/cp310-cp310" },
|
||||
{ identifier = "cp311-manylinux_i686", version = "3.11", path_str = "/opt/python/cp311-cp311" },
|
||||
{ identifier = "cp312-manylinux_i686", version = "3.12", path_str = "/opt/python/cp312-cp312" },
|
||||
{ identifier = "pp37-manylinux_x86_64", version = "3.7", path_str = "/opt/python/pp37-pypy37_pp73" },
|
||||
{ identifier = "pp38-manylinux_x86_64", version = "3.8", path_str = "/opt/python/pp38-pypy38_pp73" },
|
||||
{ identifier = "pp39-manylinux_x86_64", version = "3.9", path_str = "/opt/python/pp39-pypy39_pp73" },
|
||||
@@ -21,18 +23,21 @@ python_configurations = [
|
||||
{ identifier = "cp39-manylinux_aarch64", version = "3.9", path_str = "/opt/python/cp39-cp39" },
|
||||
{ identifier = "cp310-manylinux_aarch64", version = "3.10", path_str = "/opt/python/cp310-cp310" },
|
||||
{ identifier = "cp311-manylinux_aarch64", version = "3.11", path_str = "/opt/python/cp311-cp311" },
|
||||
{ identifier = "cp312-manylinux_aarch64", version = "3.12", path_str = "/opt/python/cp312-cp312" },
|
||||
{ identifier = "cp36-manylinux_ppc64le", version = "3.6", path_str = "/opt/python/cp36-cp36m" },
|
||||
{ identifier = "cp37-manylinux_ppc64le", version = "3.7", path_str = "/opt/python/cp37-cp37m" },
|
||||
{ identifier = "cp38-manylinux_ppc64le", version = "3.8", path_str = "/opt/python/cp38-cp38" },
|
||||
{ identifier = "cp39-manylinux_ppc64le", version = "3.9", path_str = "/opt/python/cp39-cp39" },
|
||||
{ identifier = "cp310-manylinux_ppc64le", version = "3.10", path_str = "/opt/python/cp310-cp310" },
|
||||
{ identifier = "cp311-manylinux_ppc64le", version = "3.11", path_str = "/opt/python/cp311-cp311" },
|
||||
{ identifier = "cp312-manylinux_ppc64le", version = "3.12", path_str = "/opt/python/cp312-cp312" },
|
||||
{ identifier = "cp36-manylinux_s390x", version = "3.6", path_str = "/opt/python/cp36-cp36m" },
|
||||
{ identifier = "cp37-manylinux_s390x", version = "3.7", path_str = "/opt/python/cp37-cp37m" },
|
||||
{ identifier = "cp38-manylinux_s390x", version = "3.8", path_str = "/opt/python/cp38-cp38" },
|
||||
{ identifier = "cp39-manylinux_s390x", version = "3.9", path_str = "/opt/python/cp39-cp39" },
|
||||
{ identifier = "cp310-manylinux_s390x", version = "3.10", path_str = "/opt/python/cp310-cp310" },
|
||||
{ identifier = "cp311-manylinux_s390x", version = "3.11", path_str = "/opt/python/cp311-cp311" },
|
||||
{ identifier = "cp312-manylinux_s390x", version = "3.12", path_str = "/opt/python/cp312-cp312" },
|
||||
{ identifier = "pp37-manylinux_aarch64", version = "3.7", path_str = "/opt/python/pp37-pypy37_pp73" },
|
||||
{ identifier = "pp38-manylinux_aarch64", version = "3.8", path_str = "/opt/python/pp38-pypy38_pp73" },
|
||||
{ identifier = "pp39-manylinux_aarch64", version = "3.9", path_str = "/opt/python/pp39-pypy39_pp73" },
|
||||
@@ -45,30 +50,35 @@ python_configurations = [
|
||||
{ identifier = "cp39-musllinux_x86_64", version = "3.9", path_str = "/opt/python/cp39-cp39" },
|
||||
{ identifier = "cp310-musllinux_x86_64", version = "3.10", path_str = "/opt/python/cp310-cp310" },
|
||||
{ identifier = "cp311-musllinux_x86_64", version = "3.11", path_str = "/opt/python/cp311-cp311" },
|
||||
{ identifier = "cp312-musllinux_x86_64", version = "3.12", path_str = "/opt/python/cp312-cp312" },
|
||||
{ identifier = "cp36-musllinux_i686", version = "3.6", path_str = "/opt/python/cp36-cp36m" },
|
||||
{ identifier = "cp37-musllinux_i686", version = "3.7", path_str = "/opt/python/cp37-cp37m" },
|
||||
{ identifier = "cp38-musllinux_i686", version = "3.8", path_str = "/opt/python/cp38-cp38" },
|
||||
{ identifier = "cp39-musllinux_i686", version = "3.9", path_str = "/opt/python/cp39-cp39" },
|
||||
{ identifier = "cp310-musllinux_i686", version = "3.10", path_str = "/opt/python/cp310-cp310" },
|
||||
{ identifier = "cp311-musllinux_i686", version = "3.11", path_str = "/opt/python/cp311-cp311" },
|
||||
{ identifier = "cp312-musllinux_i686", version = "3.12", path_str = "/opt/python/cp312-cp312" },
|
||||
{ identifier = "cp36-musllinux_aarch64", version = "3.6", path_str = "/opt/python/cp36-cp36m" },
|
||||
{ identifier = "cp37-musllinux_aarch64", version = "3.7", path_str = "/opt/python/cp37-cp37m" },
|
||||
{ identifier = "cp38-musllinux_aarch64", version = "3.8", path_str = "/opt/python/cp38-cp38" },
|
||||
{ identifier = "cp39-musllinux_aarch64", version = "3.9", path_str = "/opt/python/cp39-cp39" },
|
||||
{ identifier = "cp310-musllinux_aarch64", version = "3.10", path_str = "/opt/python/cp310-cp310" },
|
||||
{ identifier = "cp311-musllinux_aarch64", version = "3.11", path_str = "/opt/python/cp311-cp311" },
|
||||
{ identifier = "cp312-musllinux_aarch64", version = "3.12", path_str = "/opt/python/cp312-cp312" },
|
||||
{ identifier = "cp36-musllinux_ppc64le", version = "3.6", path_str = "/opt/python/cp36-cp36m" },
|
||||
{ identifier = "cp37-musllinux_ppc64le", version = "3.7", path_str = "/opt/python/cp37-cp37m" },
|
||||
{ identifier = "cp38-musllinux_ppc64le", version = "3.8", path_str = "/opt/python/cp38-cp38" },
|
||||
{ identifier = "cp39-musllinux_ppc64le", version = "3.9", path_str = "/opt/python/cp39-cp39" },
|
||||
{ identifier = "cp310-musllinux_ppc64le", version = "3.10", path_str = "/opt/python/cp310-cp310" },
|
||||
{ identifier = "cp311-musllinux_ppc64le", version = "3.11", path_str = "/opt/python/cp311-cp311" },
|
||||
{ identifier = "cp312-musllinux_ppc64le", version = "3.12", path_str = "/opt/python/cp312-cp312" },
|
||||
{ identifier = "cp36-musllinux_s390x", version = "3.6", path_str = "/opt/python/cp36-cp36m" },
|
||||
{ identifier = "cp37-musllinux_s390x", version = "3.7", path_str = "/opt/python/cp37-cp37m" },
|
||||
{ identifier = "cp38-musllinux_s390x", version = "3.8", path_str = "/opt/python/cp38-cp38" },
|
||||
{ identifier = "cp39-musllinux_s390x", version = "3.9", path_str = "/opt/python/cp39-cp39" },
|
||||
{ identifier = "cp310-musllinux_s390x", version = "3.10", path_str = "/opt/python/cp310-cp310" },
|
||||
{ identifier = "cp311-musllinux_s390x", version = "3.11", path_str = "/opt/python/cp311-cp311" },
|
||||
{ identifier = "cp312-musllinux_s390x", version = "3.12", path_str = "/opt/python/cp312-cp312" },
|
||||
]
|
||||
|
||||
[macos]
|
||||
@@ -87,6 +97,9 @@ python_configurations = [
|
||||
{ identifier = "cp311-macosx_x86_64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.3/python-3.11.3-macos11.pkg" },
|
||||
{ identifier = "cp311-macosx_arm64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.3/python-3.11.3-macos11.pkg" },
|
||||
{ identifier = "cp311-macosx_universal2", version = "3.11", url = "https://www.python.org/ftp/python/3.11.3/python-3.11.3-macos11.pkg" },
|
||||
{ identifier = "cp312-macosx_x86_64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0b1-macos11.pkg" },
|
||||
{ identifier = "cp312-macosx_arm64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0b1-macos11.pkg" },
|
||||
{ identifier = "cp312-macosx_universal2", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0b1-macos11.pkg" },
|
||||
{ identifier = "pp37-macosx_x86_64", version = "3.7", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.9-osx64.tar.bz2" },
|
||||
{ identifier = "pp38-macosx_x86_64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_x86_64.tar.bz2" },
|
||||
{ identifier = "pp38-macosx_arm64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_arm64.tar.bz2" },
|
||||
@@ -108,9 +121,12 @@ python_configurations = [
|
||||
{ identifier = "cp310-win_amd64", version = "3.10.11", arch = "64" },
|
||||
{ identifier = "cp311-win32", version = "3.11.3", arch = "32" },
|
||||
{ identifier = "cp311-win_amd64", version = "3.11.3", arch = "64" },
|
||||
{ identifier = "cp312-win32", version = "3.12.0-b1", arch = "32" },
|
||||
{ identifier = "cp312-win_amd64", version = "3.12.0-b1", arch = "64" },
|
||||
{ identifier = "cp39-win_arm64", version = "3.9.10", arch = "ARM64" },
|
||||
{ identifier = "cp310-win_arm64", version = "3.10.11", arch = "ARM64" },
|
||||
{ identifier = "cp311-win_arm64", version = "3.11.3", arch = "ARM64" },
|
||||
{ identifier = "cp312-win_arm64", version = "3.12.0-b1", arch = "ARM64" },
|
||||
{ identifier = "pp37-win_amd64", version = "3.7", arch = "64", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.9-win64.zip" },
|
||||
{ identifier = "pp38-win_amd64", version = "3.8", arch = "64", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-win64.zip" },
|
||||
{ identifier = "pp39-win_amd64", version = "3.9", arch = "64", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.11-win64.zip" },
|
||||
|
||||
@@ -8,21 +8,21 @@ delocate==0.10.4
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.6
|
||||
# via virtualenv
|
||||
filelock==3.11.0
|
||||
filelock==3.12.0
|
||||
# via virtualenv
|
||||
packaging==23.1
|
||||
# via delocate
|
||||
platformdirs==3.2.0
|
||||
platformdirs==3.5.1
|
||||
# via virtualenv
|
||||
typing-extensions==4.5.0
|
||||
typing-extensions==4.6.2
|
||||
# via delocate
|
||||
virtualenv==20.21.0
|
||||
virtualenv==20.23.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.40.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
pip==23.1
|
||||
pip==23.1.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
setuptools==67.6.1
|
||||
setuptools==67.8.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -8,21 +8,21 @@ delocate==0.10.4
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.6
|
||||
# via virtualenv
|
||||
filelock==3.11.0
|
||||
filelock==3.12.0
|
||||
# via virtualenv
|
||||
packaging==23.1
|
||||
# via delocate
|
||||
platformdirs==3.2.0
|
||||
platformdirs==3.5.1
|
||||
# via virtualenv
|
||||
typing-extensions==4.5.0
|
||||
typing-extensions==4.6.2
|
||||
# via delocate
|
||||
virtualenv==20.21.0
|
||||
virtualenv==20.23.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.40.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
pip==23.1
|
||||
pip==23.1.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
setuptools==67.6.1
|
||||
setuptools==67.8.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# This file is autogenerated by pip-compile with Python 3.12
|
||||
# by the following command:
|
||||
#
|
||||
# nox -s update_constraints-3.12
|
||||
#
|
||||
delocate==0.10.4
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.6
|
||||
# via virtualenv
|
||||
filelock==3.12.0
|
||||
# via virtualenv
|
||||
packaging==23.1
|
||||
# via delocate
|
||||
platformdirs==3.5.1
|
||||
# via virtualenv
|
||||
typing-extensions==4.6.2
|
||||
# via delocate
|
||||
virtualenv==20.23.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.40.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
pip==23.1.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
setuptools==67.8.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
@@ -8,20 +8,20 @@ delocate==0.10.4
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.6
|
||||
# via virtualenv
|
||||
filelock==3.11.0
|
||||
filelock==3.12.0
|
||||
# via virtualenv
|
||||
importlib-metadata==6.4.1
|
||||
importlib-metadata==6.6.0
|
||||
# via virtualenv
|
||||
packaging==23.1
|
||||
# via delocate
|
||||
platformdirs==3.2.0
|
||||
platformdirs==3.5.1
|
||||
# via virtualenv
|
||||
typing-extensions==4.5.0
|
||||
typing-extensions==4.6.2
|
||||
# via
|
||||
# delocate
|
||||
# importlib-metadata
|
||||
# platformdirs
|
||||
virtualenv==20.21.0
|
||||
virtualenv==20.23.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.40.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
@@ -29,7 +29,7 @@ zipp==3.15.0
|
||||
# via importlib-metadata
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
pip==23.1
|
||||
pip==23.1.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
setuptools==67.6.1
|
||||
setuptools==67.8.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -8,21 +8,21 @@ delocate==0.10.4
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.6
|
||||
# via virtualenv
|
||||
filelock==3.11.0
|
||||
filelock==3.12.0
|
||||
# via virtualenv
|
||||
packaging==23.1
|
||||
# via delocate
|
||||
platformdirs==3.2.0
|
||||
platformdirs==3.5.1
|
||||
# via virtualenv
|
||||
typing-extensions==4.5.0
|
||||
typing-extensions==4.6.2
|
||||
# via delocate
|
||||
virtualenv==20.21.0
|
||||
virtualenv==20.23.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.40.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
pip==23.1
|
||||
pip==23.1.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
setuptools==67.6.1
|
||||
setuptools==67.8.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -8,21 +8,21 @@ delocate==0.10.4
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.6
|
||||
# via virtualenv
|
||||
filelock==3.11.0
|
||||
filelock==3.12.0
|
||||
# via virtualenv
|
||||
packaging==23.1
|
||||
# via delocate
|
||||
platformdirs==3.2.0
|
||||
platformdirs==3.5.1
|
||||
# via virtualenv
|
||||
typing-extensions==4.5.0
|
||||
typing-extensions==4.6.2
|
||||
# via delocate
|
||||
virtualenv==20.21.0
|
||||
virtualenv==20.23.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.40.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
pip==23.1
|
||||
pip==23.1.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
setuptools==67.6.1
|
||||
setuptools==67.8.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
#
|
||||
# This file is autogenerated by pip-compile with Python 3.11
|
||||
# This file is autogenerated by pip-compile with Python 3.12
|
||||
# by the following command:
|
||||
#
|
||||
# nox -s update_constraints-3.11
|
||||
# nox -s update_constraints-3.12
|
||||
#
|
||||
delocate==0.10.4
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.6
|
||||
# via virtualenv
|
||||
filelock==3.11.0
|
||||
filelock==3.12.0
|
||||
# via virtualenv
|
||||
packaging==23.1
|
||||
# via delocate
|
||||
platformdirs==3.2.0
|
||||
platformdirs==3.5.1
|
||||
# via virtualenv
|
||||
typing-extensions==4.5.0
|
||||
typing-extensions==4.6.2
|
||||
# via delocate
|
||||
virtualenv==20.21.0
|
||||
virtualenv==20.23.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.40.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
pip==23.1
|
||||
pip==23.1.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
setuptools==67.6.1
|
||||
setuptools==67.8.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
[x86_64]
|
||||
manylinux1 = quay.io/pypa/manylinux1_x86_64:2023-04-16-36ed6a7
|
||||
manylinux1 = quay.io/pypa/manylinux1_x86_64:2023-05-01-496eb35
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2023-04-16-157f52a
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2023-05-24-3bf828e
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-12-26-0d38463
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2023-04-16-157f52a
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2023-04-16-157f52a
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2023-05-24-3bf828e
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2023-05-24-3bf828e
|
||||
|
||||
[i686]
|
||||
manylinux1 = quay.io/pypa/manylinux1_i686:2023-04-16-36ed6a7
|
||||
manylinux1 = quay.io/pypa/manylinux1_i686:2023-05-01-496eb35
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2023-04-16-157f52a
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2023-05-24-3bf828e
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2023-04-16-157f52a
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2023-05-24-3bf828e
|
||||
|
||||
[pypy_x86_64]
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2023-04-16-157f52a
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2023-05-24-3bf828e
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-12-26-0d38463
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2023-04-16-157f52a
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2023-05-24-3bf828e
|
||||
|
||||
[pypy_i686]
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2023-04-16-157f52a
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2023-05-24-3bf828e
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463
|
||||
|
||||
[aarch64]
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2023-04-16-157f52a
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2023-05-24-3bf828e
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-12-26-0d38463
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2023-04-16-157f52a
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2023-04-16-157f52a
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2023-05-24-3bf828e
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2023-05-24-3bf828e
|
||||
|
||||
[ppc64le]
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2023-04-16-157f52a
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2023-05-24-3bf828e
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-12-26-0d38463
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2023-04-16-157f52a
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2023-04-16-157f52a
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2023-05-24-3bf828e
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2023-05-24-3bf828e
|
||||
|
||||
[s390x]
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2023-04-16-157f52a
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2023-05-24-3bf828e
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-12-26-0d38463
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_s390x:2023-04-16-157f52a
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2023-04-16-157f52a
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_s390x:2023-05-24-3bf828e
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2023-05-24-3bf828e
|
||||
|
||||
[pypy_aarch64]
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2023-04-16-157f52a
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2023-05-24-3bf828e
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-12-26-0d38463
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2023-04-16-157f52a
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2023-05-24-3bf828e
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
version = "20.21.0"
|
||||
url = "https://github.com/pypa/get-virtualenv/blob/20.21.0/public/virtualenv.pyz?raw=true"
|
||||
version = "20.21.1"
|
||||
url = "https://github.com/pypa/get-virtualenv/blob/20.21.1/public/virtualenv.pyz?raw=true"
|
||||
|
||||
+4
-20
@@ -2,37 +2,21 @@ from __future__ import annotations
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from typing import TYPE_CHECKING, Union
|
||||
import typing
|
||||
from typing import Union
|
||||
|
||||
if sys.version_info < (3, 8):
|
||||
from typing_extensions import Final, Literal, OrderedDict, Protocol, TypedDict
|
||||
else:
|
||||
from typing import Final, Literal, OrderedDict, Protocol, TypedDict
|
||||
|
||||
if sys.version_info < (3, 11):
|
||||
from typing_extensions import NotRequired, assert_never
|
||||
else:
|
||||
from typing import NotRequired, assert_never
|
||||
from ._compat.typing import Final, Literal, Protocol
|
||||
|
||||
__all__ = (
|
||||
"Final",
|
||||
"Literal",
|
||||
"PLATFORMS",
|
||||
"PathOrStr",
|
||||
"PlatformName",
|
||||
"Protocol",
|
||||
"PLATFORMS",
|
||||
"PopenBytes",
|
||||
"Protocol",
|
||||
"TypedDict",
|
||||
"OrderedDict",
|
||||
"assert_never",
|
||||
"NotRequired",
|
||||
)
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
if typing.TYPE_CHECKING:
|
||||
PopenBytes = subprocess.Popen[bytes]
|
||||
PathOrStr = Union[str, os.PathLike[str]]
|
||||
else:
|
||||
|
||||
+43
-14
@@ -13,6 +13,7 @@ import textwrap
|
||||
import time
|
||||
import typing
|
||||
import urllib.request
|
||||
from collections import defaultdict
|
||||
from collections.abc import Generator, Iterable, Mapping, Sequence
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
@@ -23,12 +24,6 @@ from typing import Any, ClassVar, TextIO, TypeVar
|
||||
|
||||
import bracex
|
||||
import certifi
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
import tomllib
|
||||
else:
|
||||
import tomli as tomllib
|
||||
|
||||
from filelock import FileLock
|
||||
from packaging.requirements import InvalidRequirement, Requirement
|
||||
from packaging.specifiers import SpecifierSet
|
||||
@@ -36,7 +31,10 @@ from packaging.utils import parse_wheel_filename
|
||||
from packaging.version import Version
|
||||
from platformdirs import user_cache_path
|
||||
|
||||
from cibuildwheel.typing import Final, Literal, PathOrStr, PlatformName
|
||||
from ._compat import tomllib
|
||||
from ._compat.functools import cached_property
|
||||
from ._compat.typing import Final, Literal
|
||||
from .typing import PathOrStr, PlatformName
|
||||
|
||||
__all__ = [
|
||||
"resources_dir",
|
||||
@@ -254,7 +252,7 @@ class BuildSelector:
|
||||
requires_python: SpecifierSet | None = None
|
||||
|
||||
# a pattern that skips prerelease versions, when include_prereleases is False.
|
||||
PRERELEASE_SKIP: ClassVar[str] = ""
|
||||
PRERELEASE_SKIP: ClassVar[str] = "cp312-*"
|
||||
prerelease_pythons: bool = False
|
||||
|
||||
def __call__(self, build_id: str) -> bool:
|
||||
@@ -661,12 +659,6 @@ def find_compatible_wheel(wheels: Sequence[T], identifier: str) -> T | None:
|
||||
return None
|
||||
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
from functools import cached_property
|
||||
else:
|
||||
from .functools_cached_property_38 import cached_property
|
||||
|
||||
|
||||
# Can be replaced by contextlib.chdir in Python 3.11
|
||||
@contextlib.contextmanager
|
||||
def chdir(new_path: Path | str) -> Generator[None, None, None]:
|
||||
@@ -706,3 +698,40 @@ def fix_ansi_codes_for_github_actions(text: str) -> str:
|
||||
ansi_codes.append(code)
|
||||
|
||||
return output
|
||||
|
||||
|
||||
def parse_key_value_string(
|
||||
key_value_string: str, positional_arg_names: list[str] | None = None
|
||||
) -> dict[str, list[str]]:
|
||||
"""
|
||||
Parses a string like "docker; create_args: --some-option=value another-option"
|
||||
"""
|
||||
if positional_arg_names is None:
|
||||
positional_arg_names = []
|
||||
|
||||
shlexer = shlex.shlex(key_value_string, posix=True, punctuation_chars=";:")
|
||||
shlexer.commenters = ""
|
||||
parts = list(shlexer)
|
||||
# parts now looks like
|
||||
# ['docker', ';', 'create_args',':', '--some-option=value', 'another-option']
|
||||
|
||||
# split by semicolon
|
||||
fields = [list(group) for k, group in itertools.groupby(parts, lambda x: x == ";") if not k]
|
||||
|
||||
result: dict[str, list[str]] = defaultdict(list)
|
||||
for field_i, field in enumerate(fields):
|
||||
if len(field) > 1 and field[1] == ":":
|
||||
field_name = field[0]
|
||||
values = field[2:]
|
||||
else:
|
||||
try:
|
||||
field_name = positional_arg_names[field_i]
|
||||
except IndexError:
|
||||
msg = f"Failed to parse {key_value_string!r}. Too many positional arguments - expected a maximum of {len(positional_arg_names)}"
|
||||
raise ValueError(msg) from None
|
||||
|
||||
values = field
|
||||
|
||||
result[field_name] += values
|
||||
|
||||
return result
|
||||
|
||||
@@ -16,11 +16,12 @@ from zipfile import ZipFile
|
||||
from filelock import FileLock
|
||||
from packaging.version import Version
|
||||
|
||||
from ._compat.typing import assert_never
|
||||
from .architecture import Architecture
|
||||
from .environment import ParsedEnvironment
|
||||
from .logger import log
|
||||
from .options import Options
|
||||
from .typing import PathOrStr, assert_never
|
||||
from .typing import PathOrStr
|
||||
from .util import (
|
||||
CIBW_CACHE_PATH,
|
||||
AlreadyBuiltWheelError,
|
||||
|
||||
@@ -4,6 +4,22 @@ title: Changelog
|
||||
|
||||
# Changelog
|
||||
|
||||
### v2.13.0
|
||||
|
||||
_28 May 2023_
|
||||
|
||||
- ✨ Adds CPython 3.12 support, under the prerelease flag [CIBW_PRERELEASE_PYTHONS](https://cibuildwheel.readthedocs.io/en/stable/options/#prerelease-pythons). This version of cibuildwheel uses 3.12.0b1.
|
||||
|
||||
While CPython is in beta, the ABI can change, so your wheels might not be compatible with the final release. For this reason, we don't recommend distributing wheels until RC1, at which point 3.12 will be available in cibuildwheel without the flag. (#1507)
|
||||
|
||||
- ✨ Adds the ability to pass arguments to the container engine when the container is created, using the [CIBW_CONTAINER_ENGINE](https://cibuildwheel.readthedocs.io/en/stable/options/#container-engine) option. (#1499)
|
||||
|
||||
### v2.12.3
|
||||
|
||||
_19 April 2023_
|
||||
|
||||
- 🐛 Fix an import error when running on Python 3.7. (#1479)
|
||||
|
||||
### v2.12.2
|
||||
|
||||
_18 April 2023_
|
||||
|
||||
@@ -623,3 +623,10 @@
|
||||
os: [windows, apple, linux]
|
||||
pypi: picologging
|
||||
notes: A high-performance logging library for Python.
|
||||
|
||||
- name: aalink
|
||||
gh: artfwo/aalink
|
||||
ci: [github]
|
||||
os: [windows, apple, linux]
|
||||
pypi: aalink
|
||||
notes: Async Python interface for Ableton Link.
|
||||
|
||||
+3
-3
@@ -145,7 +145,7 @@ There are two suggested methods for keeping cibuildwheel up to date that instead
|
||||
If you use GitHub Actions for builds, you can use cibuildwheel as an action:
|
||||
|
||||
```yaml
|
||||
uses: pypa/cibuildwheel@v2.12.2
|
||||
uses: pypa/cibuildwheel@v2.13.0
|
||||
```
|
||||
|
||||
This is a composite step that just runs cibuildwheel using pipx. You can set command-line options as `with:` parameters, and use `env:` as normal.
|
||||
@@ -167,7 +167,7 @@ The second option, and the only one that supports other CI systems, is using a `
|
||||
|
||||
```bash
|
||||
# requirements-cibw.txt
|
||||
cibuildwheel==2.12.2
|
||||
cibuildwheel==2.13.0
|
||||
```
|
||||
|
||||
Then your install step would have `python -m pip install -r requirements-cibw.txt` in it. Your `.github/dependabot.yml` file could look like this:
|
||||
@@ -311,7 +311,7 @@ Solutions to this vary, but the simplest is to use pipx:
|
||||
# most runners have pipx preinstalled, but in case you don't
|
||||
python3 -m pip install pipx
|
||||
|
||||
pipx run cibuildwheel==2.12.2 --output-dir wheelhouse
|
||||
pipx run cibuildwheel==2.13.0 --output-dir wheelhouse
|
||||
pipx run twine upload wheelhouse/*.whl
|
||||
```
|
||||
|
||||
|
||||
+27
-9
@@ -92,8 +92,8 @@ Options have the same names as the environment variable overrides, but are
|
||||
placed in `[tool.cibuildwheel]` and are lower case, with dashes, following
|
||||
common [TOML][] practice. Anything placed in subsections `linux`, `windows`,
|
||||
or `macos` will only affect those platforms. Lists can be used instead of
|
||||
strings for items that are natually a list. Multiline strings also work just
|
||||
like in in the environment variables. Environment variables will take
|
||||
strings for items that are naturally a list. Multiline strings also work just
|
||||
like in the environment variables. Environment variables will take
|
||||
precedence if defined.
|
||||
|
||||
The example above using environment variables could have been written like this:
|
||||
@@ -226,6 +226,7 @@ When setting the options, you can use shell-style globbing syntax, as per [fnmat
|
||||
| Python 3.9 | cp39-macosx_x86_64<br/>cp39-macosx_universal2<br/>cp39-macosx_arm64 | cp39-win_amd64<br/>cp39-win32<br/>cp39-win_arm64 | cp39-manylinux_x86_64<br/>cp39-manylinux_i686<br/>cp39-musllinux_x86_64<br/>cp39-musllinux_i686 | cp39-manylinux_aarch64<br/>cp39-manylinux_ppc64le<br/>cp39-manylinux_s390x<br/>cp39-musllinux_aarch64<br/>cp39-musllinux_ppc64le<br/>cp39-musllinux_s390x |
|
||||
| Python 3.10 | cp310-macosx_x86_64<br/>cp310-macosx_universal2<br/>cp310-macosx_arm64 | cp310-win_amd64<br/>cp310-win32<br/>cp310-win_arm64 | cp310-manylinux_x86_64<br/>cp310-manylinux_i686<br/>cp310-musllinux_x86_64<br/>cp310-musllinux_i686 | cp310-manylinux_aarch64<br/>cp310-manylinux_ppc64le<br/>cp310-manylinux_s390x<br/>cp310-musllinux_aarch64<br/>cp310-musllinux_ppc64le<br/>cp310-musllinux_s390x |
|
||||
| Python 3.11 | cp311-macosx_x86_64<br/>cp311-macosx_universal2<br/>cp311-macosx_arm64 | cp311-win_amd64<br/>cp311-win32<br/>cp311-win_arm64 | cp311-manylinux_x86_64<br/>cp311-manylinux_i686<br/>cp311-musllinux_x86_64<br/>cp311-musllinux_i686 | cp311-manylinux_aarch64<br/>cp311-manylinux_ppc64le<br/>cp311-manylinux_s390x<br/>cp311-musllinux_aarch64<br/>cp311-musllinux_ppc64le<br/>cp311-musllinux_s390x |
|
||||
| Python 3.12 | cp312-macosx_x86_64<br/>cp312-macosx_universal2<br/>cp312-macosx_arm64 | cp312-win_amd64<br/>cp312-win32<br/>cp312-win_arm64 | cp312-manylinux_x86_64<br/>cp312-manylinux_i686<br/>cp312-musllinux_x86_64<br/>cp312-musllinux_i686 | cp312-manylinux_aarch64<br/>cp312-manylinux_ppc64le<br/>cp312-manylinux_s390x<br/>cp312-musllinux_aarch64<br/>cp312-musllinux_ppc64le<br/>cp312-musllinux_s390x |
|
||||
| PyPy3.7 v7.3 | pp37-macosx_x86_64 | pp37-win_amd64 | pp37-manylinux_x86_64<br/>pp37-manylinux_i686 | pp37-manylinux_aarch64 |
|
||||
| PyPy3.8 v7.3 | pp38-macosx_x86_64<br/>pp38-macosx_arm64 | pp38-win_amd64 | pp38-manylinux_x86_64<br/>pp38-manylinux_i686 | pp38-manylinux_aarch64 |
|
||||
| PyPy3.9 v7.3 | pp39-macosx_x86_64<br/>pp39-macosx_arm64 | pp39-win_amd64 | pp39-manylinux_x86_64<br/>pp39-manylinux_i686 | pp39-manylinux_aarch64 |
|
||||
@@ -237,7 +238,7 @@ For CPython, the minimally supported macOS version is 10.9; for PyPy 3.7, macOS
|
||||
|
||||
Windows arm64 platform support is experimental.
|
||||
|
||||
See the [cibuildwheel 1 documentation](https://cibuildwheel.readthedocs.io/en/1.x/) for past end of life versions of Python, and PyPy2.7.
|
||||
See the [cibuildwheel 1 documentation](https://cibuildwheel.readthedocs.io/en/1.x/) for past end-of-life versions of Python, and PyPy2.7.
|
||||
|
||||
#### Examples
|
||||
|
||||
@@ -314,7 +315,7 @@ See the [cibuildwheel 1 documentation](https://cibuildwheel.readthedocs.io/en/1.
|
||||
|
||||
It is generally recommended to set `CIBW_BUILD` as an environment variable, though `skip`
|
||||
tends to be useful in a config file; you can statically declare that you don't
|
||||
support pypy, for example.
|
||||
support PyPy, for example.
|
||||
|
||||
<style>
|
||||
.build-id-table-marker + table {
|
||||
@@ -658,7 +659,7 @@ Platform-specific environment variables are also available:<br/>
|
||||
### `CIBW_ENVIRONMENT_PASS_LINUX` {: #environment-pass}
|
||||
> Set environment variables on the host to pass-through to the container during the build.
|
||||
|
||||
A list of environment variables to pass into the linux container during the build. It has no affect on the other platforms, which can already access all environment variables directly.
|
||||
A list of environment variables to pass into the linux container during the build. It has no effect on the other platforms, which can already access all environment variables directly.
|
||||
|
||||
To specify more than one environment variable, separate the variable names by spaces.
|
||||
|
||||
@@ -1048,9 +1049,12 @@ Auditwheel detects the version of the manylinux / musllinux standard in the imag
|
||||
|
||||
|
||||
### `CIBW_CONTAINER_ENGINE` {: #container-engine}
|
||||
> Specify which container engine to use when building Linux wheels
|
||||
> Specify the container engine to use when building Linux wheels
|
||||
|
||||
Options: `docker` `podman`
|
||||
Options:
|
||||
|
||||
- `docker[;create_args: ...]`
|
||||
- `podman[;create_args: ...]`
|
||||
|
||||
Default: `docker`
|
||||
|
||||
@@ -1059,6 +1063,12 @@ Set the container engine to use. Docker is the default, or you can switch to
|
||||
running and `docker` available on PATH. To use Podman, it needs to be
|
||||
installed and `podman` available on PATH.
|
||||
|
||||
Arguments can be supplied to the container engine. Currently, the only option
|
||||
that's customisable is 'create_args'. Parameters to create_args are
|
||||
space-separated strings, which are passed to the container engine on the
|
||||
command line when it's creating the container. If you want to include spaces
|
||||
inside a parameter, use shell-style quoting.
|
||||
|
||||
!!! tip
|
||||
|
||||
While most users will stick with Docker, Podman is available in different
|
||||
@@ -1073,14 +1083,22 @@ installed and `podman` available on PATH.
|
||||
!!! tab examples "Environment variables"
|
||||
|
||||
```yaml
|
||||
# use podman instead of docker
|
||||
CIBW_CONTAINER_ENGINE: podman
|
||||
|
||||
# pass command line options to 'docker create'
|
||||
CIBW_CONTAINER_ENGINE: "docker; create_args: --gpus all"
|
||||
```
|
||||
|
||||
!!! tab examples "pyproject.toml"
|
||||
|
||||
```toml
|
||||
[tool.cibuildwheel]
|
||||
# use podman instead of docker
|
||||
container-engine = "podman"
|
||||
|
||||
# pass command line options to 'docker create'
|
||||
container-engine = { name = "docker", create-args = ["--gpus", "all"]}
|
||||
```
|
||||
|
||||
|
||||
@@ -1216,7 +1234,7 @@ Platform-specific environment variables are also available:<br/>
|
||||
|
||||
!!! note
|
||||
|
||||
It's isn't recommended to `cd` to your project directory before running tests,
|
||||
It isn't recommended to `cd` to your project directory before running tests,
|
||||
because Python might resolve `import yourpackage` relative to the working dir,
|
||||
and we want to test the wheel you just built. However, if you're sure that's not
|
||||
an issue for you and your workflow requires it, on Windows you should do `cd /d`,
|
||||
@@ -1393,7 +1411,7 @@ This option is not supported in the overrides section in `pyproject.toml`.
|
||||
### `CIBW_BUILD_VERBOSITY` {: #build-verbosity}
|
||||
> Increase/decrease the output of pip wheel
|
||||
|
||||
An number from 1 to 3 to increase the level of verbosity (corresponding to invoking pip with `-v`, `-vv`, and `-vvv`), between -1 and -3 (`-q`, `-qq`, and `-qqq`), or just 0 (default verbosity). These flags are useful while debugging a build when the output of the actual build invoked by `pip wheel` is required. Has no effect on the `build` backend, which produces verbose output by default.
|
||||
A number from 1 to 3 to increase the level of verbosity (corresponding to invoking pip with `-v`, `-vv`, and `-vvv`), between -1 and -3 (`-q`, `-qq`, and `-qqq`), or just 0 (default verbosity). These flags are useful while debugging a build when the output of the actual build invoked by `pip wheel` is required. Has no effect on the `build` backend, which produces verbose output by default.
|
||||
|
||||
Platform-specific environment variables are also available:<br/>
|
||||
`CIBW_BUILD_VERBOSITY_MACOS` | `CIBW_BUILD_VERBOSITY_WINDOWS` | `CIBW_BUILD_VERBOSITY_LINUX`
|
||||
|
||||
+2
-2
@@ -184,7 +184,7 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Build wheels
|
||||
run: pipx run cibuildwheel==2.12.2
|
||||
run: pipx run cibuildwheel==2.13.0
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
@@ -219,7 +219,7 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
|
||||
- uses: actions/setup-python@v3
|
||||
|
||||
- name: Install cibuildwheel
|
||||
run: python -m pip install cibuildwheel==2.12.2
|
||||
run: python -m pip install cibuildwheel==2.13.0
|
||||
|
||||
- name: Build wheels
|
||||
run: python -m cibuildwheel --output-dir wheelhouse
|
||||
|
||||
+18
-18
@@ -14,8 +14,8 @@ title: Working examples
|
||||
| [Tornado][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. |
|
||||
| [Matplotlib][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The venerable Matplotlib, a Python library with C++ portions |
|
||||
| [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform |
|
||||
| [Kivy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS |
|
||||
| [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. |
|
||||
| [Kivy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS |
|
||||
| [MyPy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | The compiled version of MyPy using MyPyC. |
|
||||
| [MemRay][] | ![github icon][] | ![linux icon][] | Memray is a memory profiler for Python |
|
||||
| [duckdb][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | DuckDB is an in-process SQL OLAP Database Management System |
|
||||
@@ -41,14 +41,14 @@ title: Working examples
|
||||
| [Confluent client for Kafka][] | ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | setup in `tools/wheels/build-wheels.bat` |
|
||||
| [Implicit][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes GPU support for linux wheels |
|
||||
| [vispy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Main repository for Vispy |
|
||||
| [tinyobjloader][] | ![azurepipelines icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Tiny but powerful single file wavefront obj loader |
|
||||
| [Dependency Injector][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Dependency injection framework for Python, uses Windows TravisCI |
|
||||
| [tinyobjloader][] | ![azurepipelines icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Tiny but powerful single file wavefront obj loader |
|
||||
| [coverage.py][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The coverage tool for Python |
|
||||
| [PyCryptodome][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A self-contained cryptographic library for Python |
|
||||
| [PyYAML][] | ![github icon][] | ![apple icon][] | Canonical source repository for PyYAML |
|
||||
| [numexpr][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast numerical array expression evaluator for Python, NumPy, PyTables, pandas, bcolz and more |
|
||||
| [h5py][] | ![azurepipelines icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | HDF5 for Python -- The h5py package is a Pythonic interface to the HDF5 binary data format. |
|
||||
| [PyAV][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Pythonic bindings for FFmpeg's libraries. |
|
||||
| [h5py][] | ![azurepipelines icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | HDF5 for Python -- The h5py package is a Pythonic interface to the HDF5 binary data format. |
|
||||
| [Wrapt][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python module for decorators, wrappers and monkey patching. |
|
||||
| [Line Profiler][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Line-by-line profiling for Python |
|
||||
| [pikepdf][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python library for reading and writing PDF, powered by qpdf |
|
||||
@@ -57,31 +57,31 @@ title: Working examples
|
||||
| [OpenColorIO][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A color management framework for visual effects and animation. |
|
||||
| [aioquic][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | QUIC and HTTP/3 implementation in Python |
|
||||
| [OpenTimelineIO][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Open Source API and interchange format for editorial timeline information. |
|
||||
| [PyTables][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python package to manage extremely large amounts of data |
|
||||
| [ruptures][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Extensive Cython + NumPy [pyproject.toml](https://github.com/deepcharles/ruptures/blob/master/pyproject.toml) example. |
|
||||
| [PyTables][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python package to manage extremely large amounts of data |
|
||||
| [Psycopg 3][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A modern implementation of a PostgreSQL adapter for Python |
|
||||
| [Parselmouth][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python interface to the Praat software package, using pybind11, C++17 and CMake, with the core Praat static library built only once and shared between wheels. |
|
||||
| [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. |
|
||||
| [DeepForest][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | An Efficient, Scalable and Optimized Python Framework for Deep Forest (2021.2.1) |
|
||||
| [google neuroglancer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | WebGL-based viewer for volumetric data |
|
||||
| [AutoPy][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. |
|
||||
| [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. |
|
||||
| [H3-py][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for H3, a hierarchical hexagonal geospatial indexing system |
|
||||
| [Rtree][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Rtree: spatial index for Python GIS ¶ |
|
||||
| [markupsafe][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Safely add untrusted strings to HTML/XML markup. |
|
||||
| [Picologging][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A high-performance logging library for Python. |
|
||||
| [pybind11 cmake_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a CMake-based build system |
|
||||
| [python-rapidjson][] | ![travisci icon][] ![gitlab icon][] ![appveyor icon][] | ![windows icon][] ![linux icon][] | Python wrapper around rapidjson |
|
||||
| [mosec][] | ![github icon][] | ![linux icon][] ![apple icon][] | A high-performance serving framework for ML models, offers dynamic batching and multi-stage pipeline to fully exploit your compute machine |
|
||||
| [KDEpy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Kernel Density Estimation in Python |
|
||||
| [python-snappy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for the snappy google library |
|
||||
| [time-machine][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Time mocking library using only the CPython C API. |
|
||||
| [tgcalls][] | ![github icon][] | ![apple icon][] ![windows icon][] | Python `pybind11` binding to Telegram's WebRTC library with third party dependencies like `OpenSSL`, `MozJPEG`, `FFmpeg`, etc. |
|
||||
| [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 |
|
||||
| [pybind11 python_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a Python-based build system |
|
||||
| [sourmash][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Quickly search, compare, and analyze genomic and metagenomic data sets. |
|
||||
| [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. |
|
||||
| [mosec][] | ![github icon][] | ![linux icon][] ![apple icon][] | A high-performance serving framework for ML models, offers dynamic batching and multi-stage pipeline to fully exploit your compute machine |
|
||||
| [jq.py][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Python bindings for jq |
|
||||
| [iminuit][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Jupyter-friendly Python interface for C++ MINUIT2 |
|
||||
| [Tokenizer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast and customizable text tokenization library with BPE and SentencePiece support |
|
||||
@@ -91,13 +91,13 @@ title: Working examples
|
||||
| [boost-histogram][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Supports full range of wheels, including PyPy and alternate archs. |
|
||||
| [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 |
|
||||
| [pillow-heif][] | ![github icon][] ![cirrusci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Bindings to libheif library with third party dependencies. Fully automated CI for tests and publishing including Apple Silicon builds. |
|
||||
| [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. |
|
||||
| [fathon][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | python package for DFA (Detrended Fluctuation Analysis) and related algorithms |
|
||||
| [Imagecodecs (fork)][] | ![azurepipelines icon][] | ![apple icon][] ![linux icon][] | Over 20 external dependencies in compiled libraries, custom docker image, `libomp`, `openblas` and `install_name_tool` for macOS. |
|
||||
| [polaroid][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Full range of wheels for setuptools rust, with auto release and PyPI deploy. |
|
||||
| [power-grid-model][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python/C++ library for distribution power system analysis |
|
||||
| [polaroid][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Full range of wheels for setuptools rust, with auto release and PyPI deploy. |
|
||||
| [etebase-py][] | ![travisci icon][] | ![linux icon][] | Python bindings to a Rust library using `setuptools-rust`, and `sccache` for improved speed. |
|
||||
| [cf-units][] | ![github icon][] | ![apple icon][] ![linux icon][] | Units of measure as required by the Climate and Forecast (CF) Metadata Conventions |
|
||||
| [pybind11 scikit_build_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | An example combining scikit-build and pybind11 |
|
||||
@@ -119,8 +119,8 @@ title: Working examples
|
||||
[Tornado]: https://github.com/tornadoweb/tornado
|
||||
[Matplotlib]: https://github.com/matplotlib/matplotlib
|
||||
[NCNN]: https://github.com/Tencent/ncnn
|
||||
[Kivy]: https://github.com/kivy/kivy
|
||||
[Prophet]: https://github.com/facebook/prophet
|
||||
[Kivy]: https://github.com/kivy/kivy
|
||||
[MyPy]: https://github.com/mypyc/mypy_mypyc-wheels
|
||||
[MemRay]: https://github.com/bloomberg/memray
|
||||
[duckdb]: https://github.com/duckdb/duckdb
|
||||
@@ -146,14 +146,14 @@ title: Working examples
|
||||
[Confluent client for Kafka]: https://github.com/confluentinc/confluent-kafka-python
|
||||
[Implicit]: https://github.com/benfred/implicit
|
||||
[vispy]: https://github.com/vispy/vispy
|
||||
[tinyobjloader]: https://github.com/tinyobjloader/tinyobjloader
|
||||
[Dependency Injector]: https://github.com/ets-labs/python-dependency-injector
|
||||
[tinyobjloader]: https://github.com/tinyobjloader/tinyobjloader
|
||||
[coverage.py]: https://github.com/nedbat/coveragepy
|
||||
[PyCryptodome]: https://github.com/Legrandin/pycryptodome
|
||||
[PyYAML]: https://github.com/yaml/pyyaml
|
||||
[numexpr]: https://github.com/pydata/numexpr
|
||||
[h5py]: https://github.com/h5py/h5py
|
||||
[PyAV]: https://github.com/PyAV-Org/PyAV
|
||||
[h5py]: https://github.com/h5py/h5py
|
||||
[Wrapt]: https://github.com/GrahamDumpleton/wrapt
|
||||
[Line Profiler]: https://github.com/pyutils/line_profiler
|
||||
[pikepdf]: https://github.com/pikepdf/pikepdf
|
||||
@@ -162,31 +162,31 @@ title: Working examples
|
||||
[OpenColorIO]: https://github.com/AcademySoftwareFoundation/OpenColorIO
|
||||
[aioquic]: https://github.com/aiortc/aioquic
|
||||
[OpenTimelineIO]: https://github.com/PixarAnimationStudios/OpenTimelineIO
|
||||
[PyTables]: https://github.com/PyTables/PyTables
|
||||
[ruptures]: https://github.com/deepcharles/ruptures
|
||||
[PyTables]: https://github.com/PyTables/PyTables
|
||||
[Psycopg 3]: https://github.com/psycopg/psycopg
|
||||
[Parselmouth]: https://github.com/YannickJadoul/Parselmouth
|
||||
[CTranslate2]: https://github.com/OpenNMT/CTranslate2
|
||||
[DeepForest]: https://github.com/LAMDA-NJU/Deep-Forest
|
||||
[google neuroglancer]: https://github.com/google/neuroglancer
|
||||
[AutoPy]: https://github.com/autopilot-rs/autopy
|
||||
[CTranslate2]: https://github.com/OpenNMT/CTranslate2
|
||||
[H3-py]: https://github.com/uber/h3-py
|
||||
[Rtree]: https://github.com/Toblerity/rtree
|
||||
[markupsafe]: https://github.com/pallets/markupsafe
|
||||
[Picologging]: https://github.com/microsoft/picologging
|
||||
[pybind11 cmake_example]: https://github.com/pybind/cmake_example
|
||||
[python-rapidjson]: https://github.com/python-rapidjson/python-rapidjson
|
||||
[mosec]: https://github.com/mosecorg/mosec
|
||||
[KDEpy]: https://github.com/tommyod/KDEpy
|
||||
[python-snappy]: https://github.com/andrix/python-snappy
|
||||
[time-machine]: https://github.com/adamchainz/time-machine
|
||||
[tgcalls]: https://github.com/MarshalX/tgcalls
|
||||
[pybind11 python_example]: https://github.com/pybind/python_example
|
||||
[dd-trace-py]: https://github.com/DataDog/dd-trace-py
|
||||
[pybind11 python_example]: https://github.com/pybind/python_example
|
||||
[sourmash]: https://github.com/dib-lab/sourmash
|
||||
[cyvcf2]: https://github.com/brentp/cyvcf2
|
||||
[matrixprofile]: https://github.com/matrix-profile-foundation/matrixprofile
|
||||
[abess]: https://github.com/abess-team/abess
|
||||
[mosec]: https://github.com/mosecorg/mosec
|
||||
[jq.py]: https://github.com/mwilliamson/jq.py
|
||||
[iminuit]: https://github.com/scikit-hep/iminuit
|
||||
[Tokenizer]: https://github.com/OpenNMT/Tokenizer
|
||||
@@ -196,13 +196,13 @@ title: Working examples
|
||||
[boost-histogram]: https://github.com/scikit-hep/boost-histogram
|
||||
[iDynTree]: https://github.com/robotology/idyntree
|
||||
[Python-WebRTC]: https://github.com/MarshalX/python-webrtc
|
||||
[pybase64]: https://github.com/mayeut/pybase64
|
||||
[pillow-heif]: https://github.com/bigcat88/pillow_heif
|
||||
[pybase64]: https://github.com/mayeut/pybase64
|
||||
[Arbor]: https://github.com/arbor-sim/arbor
|
||||
[fathon]: https://github.com/stfbnc/fathon
|
||||
[Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build
|
||||
[polaroid]: https://github.com/daggy1234/polaroid
|
||||
[power-grid-model]: https://github.com/alliander-opensource/power-grid-model
|
||||
[polaroid]: https://github.com/daggy1234/polaroid
|
||||
[etebase-py]: https://github.com/etesync/etebase-py
|
||||
[cf-units]: https://github.com/SciTools/cf-units
|
||||
[pybind11 scikit_build_example]: https://github.com/pybind/scikit_build_example
|
||||
|
||||
@@ -12,7 +12,7 @@ stack: python 3.7
|
||||
init:
|
||||
- cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH%
|
||||
|
||||
install: python -m pip install cibuildwheel==2.12.2
|
||||
install: python -m pip install cibuildwheel==2.13.0
|
||||
|
||||
build_script: python -m cibuildwheel --output-dir wheelhouse
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ jobs:
|
||||
- bash: |
|
||||
set -o errexit
|
||||
python3 -m pip install --upgrade pip
|
||||
pip3 install cibuildwheel==2.12.2
|
||||
pip3 install cibuildwheel==2.13.0
|
||||
displayName: Install dependencies
|
||||
- bash: cibuildwheel --output-dir wheelhouse .
|
||||
displayName: Build wheels
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
- bash: |
|
||||
set -o errexit
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install cibuildwheel==2.12.2
|
||||
python3 -m pip install cibuildwheel==2.13.0
|
||||
displayName: Install dependencies
|
||||
- bash: cibuildwheel --output-dir wheelhouse .
|
||||
displayName: Build wheels
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
- bash: |
|
||||
set -o errexit
|
||||
python -m pip install --upgrade pip
|
||||
pip install cibuildwheel==2.12.2
|
||||
pip install cibuildwheel==2.13.0
|
||||
displayName: Install dependencies
|
||||
- bash: cibuildwheel --output-dir wheelhouse .
|
||||
displayName: Build wheels
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
- run:
|
||||
name: Build the Linux wheels.
|
||||
command: |
|
||||
pip3 install --user cibuildwheel==2.12.2
|
||||
pip3 install --user cibuildwheel==2.13.0
|
||||
cibuildwheel --output-dir wheelhouse
|
||||
- store_artifacts:
|
||||
path: wheelhouse/
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
- run:
|
||||
name: Build the Linux aarch64 wheels.
|
||||
command: |
|
||||
python3 -m pip install --user cibuildwheel==2.12.2
|
||||
python3 -m pip install --user cibuildwheel==2.13.0
|
||||
python3 -m cibuildwheel --output-dir wheelhouse
|
||||
- store_artifacts:
|
||||
path: wheelhouse/
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
- run:
|
||||
name: Build the OS X wheels.
|
||||
command: |
|
||||
pip3 install cibuildwheel==2.12.2
|
||||
pip3 install cibuildwheel==2.13.0
|
||||
cibuildwheel --output-dir wheelhouse
|
||||
- store_artifacts:
|
||||
path: wheelhouse/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
|
||||
install_cibuildwheel_script:
|
||||
- python -m pip install cibuildwheel==2.12.2
|
||||
- python -m pip install cibuildwheel==2.13.0
|
||||
run_cibuildwheel_script:
|
||||
- cibuildwheel
|
||||
wheels_artifacts:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
|
||||
install_cibuildwheel_script:
|
||||
- python -m pip install cibuildwheel==2.12.2
|
||||
- python -m pip install cibuildwheel==2.13.0
|
||||
run_cibuildwheel_script:
|
||||
- cibuildwheel
|
||||
wheels_artifacts:
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v2.12.2
|
||||
uses: pypa/cibuildwheel@v2.13.0
|
||||
env:
|
||||
CIBW_ARCHS_MACOS: x86_64 arm64
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v2.12.2
|
||||
uses: pypa/cibuildwheel@v2.13.0
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v2.12.2
|
||||
uses: pypa/cibuildwheel@v2.13.0
|
||||
# env:
|
||||
# CIBW_SOME_OPTION: value
|
||||
# ...
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
platforms: all
|
||||
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v2.12.2
|
||||
uses: pypa/cibuildwheel@v2.13.0
|
||||
env:
|
||||
# configure cibuildwheel to build native archs ('auto'), and some
|
||||
# emulated ones
|
||||
|
||||
@@ -12,7 +12,7 @@ linux:
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
script:
|
||||
- curl -sSL https://get.docker.com/ | sh
|
||||
- python -m pip install cibuildwheel==2.12.2
|
||||
- python -m pip install cibuildwheel==2.13.0
|
||||
- cibuildwheel --output-dir wheelhouse
|
||||
artifacts:
|
||||
paths:
|
||||
@@ -23,7 +23,7 @@ windows:
|
||||
before_script:
|
||||
- choco install python -y --version 3.8.6
|
||||
- choco install git.install -y
|
||||
- py -m pip install cibuildwheel==2.12.2
|
||||
- py -m pip install cibuildwheel==2.13.0
|
||||
script:
|
||||
- py -m cibuildwheel --output-dir wheelhouse --platform windows
|
||||
artifacts:
|
||||
|
||||
@@ -14,7 +14,7 @@ linux:
|
||||
- curl -sSL https://get.docker.com/ | sh
|
||||
# Warning: This is extremely slow, be careful with how many wheels you build
|
||||
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
- python -m pip install cibuildwheel==2.12.2
|
||||
- python -m pip install cibuildwheel==2.13.0
|
||||
# Assuming your CI runner's default architecture is x86_64...
|
||||
- cibuildwheel --output-dir wheelhouse --platform linux --archs aarch64
|
||||
artifacts:
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
|
||||
|
||||
install:
|
||||
- python3 -m pip install cibuildwheel==2.12.2
|
||||
- python3 -m pip install cibuildwheel==2.13.0
|
||||
|
||||
script:
|
||||
# build the wheels, put them into './dist'
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
|
||||
|
||||
install:
|
||||
- python3 -m pip install cibuildwheel==2.12.2
|
||||
- python3 -m pip install cibuildwheel==2.13.0
|
||||
|
||||
script:
|
||||
# build the wheels, put them into './wheelhouse'
|
||||
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
- stage: deploy
|
||||
name: Build and deploy Linux wheels
|
||||
services: docker
|
||||
install: python3 -m pip install cibuildwheel==2.12.2 twine
|
||||
install: python3 -m pip install cibuildwheel==2.13.0 twine
|
||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
||||
after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl
|
||||
# Deploy on windows
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
name: Build and deploy Windows wheels
|
||||
os: windows
|
||||
language: shell
|
||||
install: python3 -m pip install cibuildwheel==2.12.2 twine
|
||||
install: python3 -m pip install cibuildwheel==2.13.0 twine
|
||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
||||
after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import nox
|
||||
|
||||
nox.options.sessions = ["lint", "pylint", "check_manifest", "tests"]
|
||||
|
||||
PYTHON_ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
|
||||
PYTHON_ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
|
||||
|
||||
DIR = Path(__file__).parent.resolve()
|
||||
|
||||
|
||||
+10
-1
@@ -149,7 +149,7 @@ extend-ignore = [
|
||||
"PT007", # False positive (fixed upstream)
|
||||
]
|
||||
target-version = "py37"
|
||||
typing-modules = ["cibuildwheel.typing"]
|
||||
typing-modules = ["cibuildwheel._compat.typing"]
|
||||
flake8-unused-arguments.ignore-variadic-names = true
|
||||
|
||||
[tool.ruff.flake8-tidy-imports.banned-api]
|
||||
@@ -158,6 +158,15 @@ flake8-unused-arguments.ignore-variadic-names = true
|
||||
"typing.Iterator".msg = "Use collections.abc.Iterator instead."
|
||||
"typing.Sequence".msg = "Use collections.abc.Sequence instead."
|
||||
"typing.Set".msg = "Use collections.abc.Set instead."
|
||||
"typing.Protocol".msg = "Use cibuildwheel._compat.typing.Protocol instead."
|
||||
"typing.Final".msg = "Use cibuildwheel._compat.typing.Final instead."
|
||||
"typing.Literal".msg = "Use cibuildwheel._compat.typing.Literal instead."
|
||||
"typing.OrderedDict".msg = "Use cibuildwheel._compat.typing.OrderedDict instead."
|
||||
"typing.TypedDict".msg = "Use cibuildwheel._compat.typing.TypedDict instead."
|
||||
"typing.NotRequired".msg = "Use cibuildwheel._compat.typing.NotRequired instead."
|
||||
"typing.assert_never".msg = "Use cibuildwheel._compat.typing.assert_never instead."
|
||||
"tomllib".msg = "Use cibuildwheel._compat.tomllib instead."
|
||||
"tomli".msg = "Use cibuildwheel._compat.tomllib instead."
|
||||
|
||||
[tool.ruff.per-file-ignores]
|
||||
"unit_test/*" = ["PLC1901"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = cibuildwheel
|
||||
version = 2.12.2
|
||||
version = 2.13.0
|
||||
description = Build Python wheels on CI with minimal configuration.
|
||||
long_description = file: README.md
|
||||
long_description_content_type = text/markdown
|
||||
|
||||
@@ -47,7 +47,7 @@ def test_abi3(tmp_path):
|
||||
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
|
||||
if "-pp" not in w and "-cp39" not in w and "-cp31" not in w
|
||||
]
|
||||
assert set(actual_wheels) == set(expected_wheels)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ from . import test_projects, utils
|
||||
basic_project = test_projects.new_c_project()
|
||||
|
||||
|
||||
def test(tmp_path, capfd, request):
|
||||
def test_podman(tmp_path, capfd, request):
|
||||
if utils.platform != "linux":
|
||||
pytest.skip("the test is only relevant to the linux build")
|
||||
|
||||
@@ -38,3 +38,29 @@ def test(tmp_path, capfd, request):
|
||||
# check that stdout is bring passed-though from container correctly
|
||||
captured = capfd.readouterr()
|
||||
assert "test log statement from before-all" in captured.out
|
||||
|
||||
|
||||
def test_create_args(tmp_path, capfd):
|
||||
if utils.platform != "linux":
|
||||
pytest.skip("the test is only relevant to the linux build")
|
||||
|
||||
project_dir = tmp_path / "project"
|
||||
basic_project.generate(project_dir)
|
||||
|
||||
# build a manylinux wheel, using create_args to set an environment variable
|
||||
actual_wheels = utils.cibuildwheel_run(
|
||||
project_dir,
|
||||
add_env={
|
||||
"CIBW_BUILD": "cp310-manylinux_*",
|
||||
"CIBW_BEFORE_ALL": "echo TEST_CREATE_ARGS is set to $TEST_CREATE_ARGS",
|
||||
"CIBW_CONTAINER_ENGINE": "docker; create_args: --env=TEST_CREATE_ARGS=itworks",
|
||||
},
|
||||
)
|
||||
|
||||
expected_wheels = [
|
||||
w for w in utils.expected_wheels("spam", "0.1.0") if ("cp310-manylinux" in w)
|
||||
]
|
||||
assert set(actual_wheels) == set(expected_wheels)
|
||||
|
||||
captured = capfd.readouterr()
|
||||
assert "TEST_CREATE_ARGS is set to itworks" in captured.out
|
||||
@@ -120,10 +120,10 @@ def test_dependency_constraints_file(tmp_path, build_frontend_env):
|
||||
project_with_expected_version_checks.generate(project_dir)
|
||||
|
||||
tool_versions = {
|
||||
"pip": "20.0.2",
|
||||
"setuptools": "53.0.0",
|
||||
"wheel": "0.36.2",
|
||||
"virtualenv": "20.11.2",
|
||||
"pip": "23.1.2",
|
||||
"setuptools": "67.7.2",
|
||||
"wheel": "0.38.3",
|
||||
"virtualenv": "20.23.0",
|
||||
}
|
||||
|
||||
constraints_file = tmp_path / "constraints file.txt"
|
||||
@@ -155,11 +155,12 @@ def test_dependency_constraints_file(tmp_path, build_frontend_env):
|
||||
add_env={
|
||||
"CIBW_ENVIRONMENT": cibw_environment_option,
|
||||
"CIBW_DEPENDENCY_VERSIONS": str(constraints_file),
|
||||
"CIBW_SKIP": "cp36-*",
|
||||
**build_frontend_env,
|
||||
},
|
||||
)
|
||||
|
||||
# also check that we got the right wheels
|
||||
expected_wheels = utils.expected_wheels("spam", "0.1.0")
|
||||
expected_wheels = [w for w in utils.expected_wheels("spam", "0.1.0") if "-cp36" not in w]
|
||||
|
||||
assert set(actual_wheels) == set(expected_wheels)
|
||||
|
||||
@@ -84,8 +84,11 @@ def test(manylinux_image, tmp_path):
|
||||
# We don't have a manylinux1 image for PyPy & CPython 3.10 and above
|
||||
add_env["CIBW_SKIP"] = "pp* cp31*"
|
||||
if manylinux_image in {"manylinux2010"}:
|
||||
# We don't have a manylinux2010 image for PyPy 3.9, CPython 3.11
|
||||
add_env["CIBW_SKIP"] = "pp39* cp311*"
|
||||
# We don't have a manylinux2010 image for PyPy 3.9, CPython 3.11+
|
||||
add_env["CIBW_SKIP"] = "pp39* cp311* cp312*"
|
||||
if manylinux_image in {"manylinux_2_24"}:
|
||||
# We don't have a manylinux_2_24 image for CPython 3.12+
|
||||
add_env["CIBW_SKIP"] = "cp312*"
|
||||
if manylinux_image == "manylinux_2_28" and platform.machine() == "x86_64":
|
||||
# We don't have a manylinux_2_28 image for i686
|
||||
add_env["CIBW_ARCHS"] = "x86_64"
|
||||
@@ -109,7 +112,15 @@ def test(manylinux_image, tmp_path):
|
||||
|
||||
if manylinux_image in {"manylinux2010"}:
|
||||
# remove PyPy 3.9 & CPython 3.11
|
||||
expected_wheels = [w for w in expected_wheels if "-pp39" not in w and "-cp311" not in w]
|
||||
expected_wheels = [
|
||||
w
|
||||
for w in expected_wheels
|
||||
if "-pp39" not in w and "-cp311" not in w and "-cp312" not in w
|
||||
]
|
||||
|
||||
if manylinux_image in {"manylinux_2_24"}:
|
||||
# remove CPython 3.11 and above
|
||||
expected_wheels = [w for w in expected_wheels if "-cp312" not in w]
|
||||
|
||||
if manylinux_image == "manylinux_2_28" and platform.machine() == "x86_64":
|
||||
# We don't have a manylinux_2_28 image for i686
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@ basic_project = test_projects.new_c_project(
|
||||
"""
|
||||
# Will fail if PEP 518 does work
|
||||
import requests
|
||||
assert requests.__version__ == "2.23.0", "Requests found but wrong version ({0})".format(requests.__version__)
|
||||
assert requests.__version__ == "2.27.0", "Requests found but wrong version ({0})".format(requests.__version__)
|
||||
|
||||
# Just making sure environment is still set
|
||||
import os
|
||||
@@ -27,7 +27,7 @@ requires = [
|
||||
"setuptools >= 42",
|
||||
"setuptools_scm[toml]>=4.1.2",
|
||||
"wheel",
|
||||
"requests==2.23.0"
|
||||
"requests==2.27.0"
|
||||
]
|
||||
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
+14
-1
@@ -170,6 +170,7 @@ def expected_wheels(
|
||||
"cp39-cp39",
|
||||
"cp310-cp310",
|
||||
"cp311-cp311",
|
||||
"cp312-cp312",
|
||||
]
|
||||
|
||||
if machine_arch in ["x86_64", "AMD64", "x86", "aarch64"]:
|
||||
@@ -182,6 +183,7 @@ def expected_wheels(
|
||||
"cp39-cp39",
|
||||
"cp310-cp310",
|
||||
"cp311-cp311",
|
||||
"cp312-cp312",
|
||||
"pp38-pypy38_pp73",
|
||||
"pp39-pypy39_pp73",
|
||||
]
|
||||
@@ -192,7 +194,7 @@ def expected_wheels(
|
||||
platform_tags = []
|
||||
|
||||
if platform == "linux":
|
||||
architectures = [machine_arch]
|
||||
architectures = [arch_name_for_linux(machine_arch)]
|
||||
|
||||
if machine_arch == "x86_64":
|
||||
architectures.append("i686")
|
||||
@@ -255,3 +257,14 @@ def get_macos_version():
|
||||
"""
|
||||
version_str, _, _ = pm.mac_ver()
|
||||
return tuple(map(int, version_str.split(".")[:2]))
|
||||
|
||||
|
||||
def arch_name_for_linux(arch: str):
|
||||
"""
|
||||
Archs have different names on different platforms, but it's useful to be
|
||||
able to run linux tests on dev machines. This function translates between
|
||||
the different names.
|
||||
"""
|
||||
if arch == "arm64":
|
||||
return "aarch64"
|
||||
return arch
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
import tomllib
|
||||
else:
|
||||
import tomli as tomllib
|
||||
|
||||
from packaging.version import Version
|
||||
|
||||
from cibuildwheel._compat import tomllib
|
||||
from cibuildwheel.extra import Printable, dump_python_configurations
|
||||
from cibuildwheel.util import resources_dir
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ def test_build():
|
||||
assert build_selector("cp37-manylinux_x86_64")
|
||||
assert build_selector("cp310-manylinux_x86_64")
|
||||
assert build_selector("cp311-manylinux_x86_64")
|
||||
assert not build_selector("cp312-manylinux_x86_64")
|
||||
assert build_selector("pp36-manylinux_x86_64")
|
||||
assert build_selector("pp37-manylinux_x86_64")
|
||||
assert build_selector("cp36-manylinux_i686")
|
||||
@@ -31,6 +32,7 @@ def test_build():
|
||||
assert build_selector("cp37-win_amd64")
|
||||
assert build_selector("cp310-win_amd64")
|
||||
assert build_selector("cp311-win_amd64")
|
||||
assert not build_selector("cp312-win_amd64")
|
||||
assert not build_selector("pp36-win_amd64")
|
||||
assert not build_selector("pp37-win_amd64")
|
||||
|
||||
@@ -43,9 +45,9 @@ def test_build_filter_pre():
|
||||
)
|
||||
|
||||
assert build_selector("cp37-manylinux_x86_64")
|
||||
assert build_selector("cp311-manylinux_x86_64")
|
||||
assert build_selector("cp312-manylinux_x86_64")
|
||||
assert build_selector("cp37-win_amd64")
|
||||
assert build_selector("cp311-win_amd64")
|
||||
assert build_selector("cp312-win_amd64")
|
||||
|
||||
|
||||
def test_skip():
|
||||
|
||||
@@ -6,12 +6,8 @@ from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
import tomllib
|
||||
else:
|
||||
import tomli as tomllib
|
||||
|
||||
from cibuildwheel.__main__ import main
|
||||
from cibuildwheel._compat import tomllib
|
||||
from cibuildwheel.environment import ParsedEnvironment
|
||||
from cibuildwheel.options import BuildOptions, _get_pinned_container_images
|
||||
from cibuildwheel.util import BuildSelector, resources_dir, split_config_settings
|
||||
|
||||
@@ -12,7 +12,7 @@ import pytest
|
||||
import tomli_w
|
||||
|
||||
from cibuildwheel.environment import EnvironmentAssignmentBash
|
||||
from cibuildwheel.oci_container import OCIContainer
|
||||
from cibuildwheel.oci_container import OCIContainer, OCIContainerEngineConfig
|
||||
|
||||
# Test utilities
|
||||
|
||||
@@ -21,7 +21,7 @@ from cibuildwheel.oci_container import OCIContainer
|
||||
pm = platform.machine()
|
||||
if pm == "x86_64":
|
||||
DEFAULT_IMAGE = "quay.io/pypa/manylinux2014_x86_64:2020-05-17-2f8ac3b"
|
||||
elif pm == "aarch64":
|
||||
elif pm in {"aarch64", "arm64"}:
|
||||
DEFAULT_IMAGE = "quay.io/pypa/manylinux2014_aarch64:2020-05-17-2f8ac3b"
|
||||
elif pm == "ppc64le":
|
||||
DEFAULT_IMAGE = "quay.io/pypa/manylinux2014_ppc64le:2020-05-17-2f8ac3b"
|
||||
@@ -30,6 +30,8 @@ elif pm == "s390x":
|
||||
else:
|
||||
DEFAULT_IMAGE = ""
|
||||
|
||||
PODMAN = OCIContainerEngineConfig(name="podman")
|
||||
|
||||
|
||||
@pytest.fixture(params=["docker", "podman"])
|
||||
def container_engine(request):
|
||||
@@ -37,7 +39,7 @@ def container_engine(request):
|
||||
pytest.skip("need --run-docker option to run")
|
||||
if request.param == "podman" and not request.config.getoption("--run-podman"):
|
||||
pytest.skip("need --run-podman option to run")
|
||||
return request.param
|
||||
return OCIContainerEngineConfig(name=request.param)
|
||||
|
||||
|
||||
# Tests
|
||||
@@ -81,7 +83,7 @@ def test_cwd(container_engine):
|
||||
def test_container_removed(container_engine):
|
||||
with OCIContainer(engine=container_engine, image=DEFAULT_IMAGE) as container:
|
||||
docker_containers_listing = subprocess.run(
|
||||
f"{container.engine} container ls",
|
||||
f"{container.engine.name} container ls",
|
||||
shell=True,
|
||||
check=True,
|
||||
stdout=subprocess.PIPE,
|
||||
@@ -92,7 +94,7 @@ def test_container_removed(container_engine):
|
||||
old_container_name = container.name
|
||||
|
||||
docker_containers_listing = subprocess.run(
|
||||
f"{container.engine} container ls",
|
||||
f"{container.engine.name} container ls",
|
||||
shell=True,
|
||||
check=True,
|
||||
stdout=subprocess.PIPE,
|
||||
@@ -280,7 +282,7 @@ def test_podman_vfs(tmp_path: Path, monkeypatch, request):
|
||||
monkeypatch.setenv("CONTAINERS_CONF", str(vfs_containers_conf_fpath))
|
||||
monkeypatch.setenv("CONTAINERS_STORAGE_CONF", str(vfs_containers_storage_conf_fpath))
|
||||
|
||||
with OCIContainer(engine="podman", image=DEFAULT_IMAGE) as container:
|
||||
with OCIContainer(engine=PODMAN, image=DEFAULT_IMAGE) as container:
|
||||
# test running a command
|
||||
assert container.call(["echo", "hello"], capture_output=True) == "hello\n"
|
||||
|
||||
@@ -296,3 +298,72 @@ def test_podman_vfs(tmp_path: Path, monkeypatch, request):
|
||||
# as UID 0. The reason why permission errors occur on podman is documented
|
||||
# in https://podman.io/blogs/2018/10/03/podman-remove-content-homedir.html
|
||||
subprocess.run(["podman", "unshare", "rm", "-rf", vfs_path], check=True)
|
||||
|
||||
|
||||
def test_create_args_volume(tmp_path: Path, request):
|
||||
if not request.config.getoption("--run-docker"):
|
||||
pytest.skip("need --run-docker option to run")
|
||||
|
||||
if "CIRCLECI" in os.environ or "GITLAB_CI" in os.environ:
|
||||
pytest.skip(
|
||||
"Skipping test on CircleCI/GitLab because docker there does not support --volume"
|
||||
)
|
||||
|
||||
test_mount_dir = tmp_path / "test_mount"
|
||||
test_mount_dir.mkdir()
|
||||
(test_mount_dir / "test_file.txt").write_text("1234")
|
||||
container_engine = OCIContainerEngineConfig(
|
||||
name="docker", create_args=[f"--volume={test_mount_dir}:/test_mount"]
|
||||
)
|
||||
|
||||
with OCIContainer(
|
||||
engine=container_engine,
|
||||
image=DEFAULT_IMAGE,
|
||||
) as container:
|
||||
assert container.call(["cat", "/test_mount/test_file.txt"], capture_output=True) == "1234"
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("config", "name", "create_args"),
|
||||
[
|
||||
(
|
||||
"docker",
|
||||
"docker",
|
||||
[],
|
||||
),
|
||||
(
|
||||
"docker;create_args:",
|
||||
"docker",
|
||||
[],
|
||||
),
|
||||
(
|
||||
"docker;create_args:--abc --def",
|
||||
"docker",
|
||||
["--abc", "--def"],
|
||||
),
|
||||
(
|
||||
"docker; create_args: --abc --def",
|
||||
"docker",
|
||||
["--abc", "--def"],
|
||||
),
|
||||
(
|
||||
"name:docker; create_args: --abc --def",
|
||||
"docker",
|
||||
["--abc", "--def"],
|
||||
),
|
||||
(
|
||||
'docker; create_args: --some-option="value with spaces"',
|
||||
"docker",
|
||||
["--some-option=value with spaces"],
|
||||
),
|
||||
(
|
||||
'docker; create_args: --some-option="value; with; semicolons" --another-option',
|
||||
"docker",
|
||||
["--some-option=value; with; semicolons", "--another-option"],
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_parse_engine_config(config, name, create_args):
|
||||
engine_config = OCIContainerEngineConfig.from_config_string(config)
|
||||
assert engine_config.name == name
|
||||
assert engine_config.create_args == create_args
|
||||
|
||||
@@ -198,3 +198,58 @@ def test_toml_environment_quoting(tmp_path: Path, toml_assignment, result_value)
|
||||
)
|
||||
|
||||
assert environment_values["TEST_VAR"] == result_value
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("toml_assignment", "result_name", "result_create_args"),
|
||||
[
|
||||
(
|
||||
'container-engine = "podman"',
|
||||
"podman",
|
||||
[],
|
||||
),
|
||||
(
|
||||
'container-engine = {name = "podman"}',
|
||||
"podman",
|
||||
[],
|
||||
),
|
||||
(
|
||||
'container-engine = "docker; create_args: --some-option"',
|
||||
"docker",
|
||||
["--some-option"],
|
||||
),
|
||||
(
|
||||
'container-engine = {name = "docker", create-args = ["--some-option"]}',
|
||||
"docker",
|
||||
["--some-option"],
|
||||
),
|
||||
(
|
||||
'container-engine = {name = "docker", create-args = ["--some-option", "value that contains spaces"]}',
|
||||
"docker",
|
||||
["--some-option", "value that contains spaces"],
|
||||
),
|
||||
(
|
||||
'container-engine = {name = "docker", create-args = ["--some-option", "value;that;contains;semicolons"]}',
|
||||
"docker",
|
||||
["--some-option", "value;that;contains;semicolons"],
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_container_engine_option(tmp_path: Path, toml_assignment, result_name, result_create_args):
|
||||
args = CommandLineArguments.defaults()
|
||||
args.package_dir = tmp_path
|
||||
|
||||
tmp_path.joinpath("pyproject.toml").write_text(
|
||||
textwrap.dedent(
|
||||
f"""\
|
||||
[tool.cibuildwheel]
|
||||
{toml_assignment}
|
||||
"""
|
||||
)
|
||||
)
|
||||
|
||||
options = Options(platform="linux", command_line_arguments=args, env={})
|
||||
parsed_container_engine = options.globals.container_engine
|
||||
|
||||
assert parsed_container_engine.name == result_name
|
||||
assert parsed_container_engine.create_args == result_create_args
|
||||
|
||||
Reference in New Issue
Block a user