Merge remote-tracking branch 'origin/main' into constraints-cleanup

This commit is contained in:
Joe Rickerby
2024-02-27 21:28:54 +00:00
50 changed files with 476 additions and 271 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
from __future__ import annotations
__version__ = "2.16.2"
__version__ = "2.16.5"
+1 -1
View File
@@ -160,7 +160,7 @@ def main() -> None:
# This is now the new package dir
args.package_dir = project_dir.resolve()
with chdir(temp_dir):
with chdir(project_dir):
build_in_directory(args)
finally:
# avoid https://github.com/python/cpython/issues/86962 by performing
+8 -9
View File
@@ -486,9 +486,8 @@ def build(options: Options, tmp_path: Path) -> None:
unwrap(
"""
While arm64 wheels can be built on x86_64, they cannot be
tested. The ability to test the arm64 wheels will be added in a
future release of cibuildwheel, once Apple Silicon CI runners
are widely available. To silence this warning, set
tested. Consider building arm64 wheels natively, if your CI
provider offers this. To silence this warning, set
`CIBW_TEST_SKIP: "*-macosx_arm64"`.
"""
)
@@ -498,11 +497,11 @@ def build(options: Options, tmp_path: Path) -> None:
unwrap(
"""
While universal2 wheels can be built on x86_64, the arm64 part
of them cannot currently be tested. The ability to test the
arm64 part of a universal2 wheel will be added in a future
release of cibuildwheel, once Apple Silicon CI runners are
widely available. To silence this warning, set
`CIBW_TEST_SKIP: "*-macosx_universal2:arm64"`.
of the wheel cannot be tested on x86_64. Consider building
universal2 wheels on an arm64 runner, if your CI provider offers
this. Notably, an arm64 runner can also test the x86_64 part of
the wheel, through Rosetta emulation. To silence this warning,
set `CIBW_TEST_SKIP: "*-macosx_universal2:arm64"`.
"""
)
)
@@ -541,7 +540,7 @@ def build(options: Options, tmp_path: Path) -> None:
# there are no dependencies that were pulled in at build time.
call("pip", "install", "virtualenv", *dependency_constraint_flags, env=env)
venv_dir = identifier_tmp_dir / "venv-test"
venv_dir = identifier_tmp_dir / f"venv-test-{testing_arch}"
arch_prefix = []
if testing_arch != machine_arch:
+21 -5
View File
@@ -33,11 +33,14 @@ ContainerEngineName = Literal["docker", "podman"]
class OCIContainerEngineConfig:
name: ContainerEngineName
create_args: Sequence[str] = ()
disable_host_mount: bool = False
@staticmethod
def from_config_string(config_string: str) -> OCIContainerEngineConfig:
config_dict = parse_key_value_string(
config_string, ["name"], ["create_args", "create-args"]
config_string,
["name"],
["create_args", "create-args", "disable_host_mount", "disable-host-mount"],
)
name = " ".join(config_dict["name"])
if name not in {"docker", "podman"}:
@@ -45,15 +48,28 @@ class OCIContainerEngineConfig:
raise ValueError(msg)
name = typing.cast(ContainerEngineName, name)
# some flexibility in the option name to cope with TOML conventions
# some flexibility in the option names 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)
disable_host_mount_options = (
config_dict.get("disable_host_mount") or config_dict.get("disable-host-mount") or []
)
disable_host_mount = (
strtobool(disable_host_mount_options[-1]) if disable_host_mount_options else False
)
return OCIContainerEngineConfig(
name=name, create_args=create_args, disable_host_mount=disable_host_mount
)
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)}
return {
"name": self.name,
"create_args": repr(self.create_args),
"disable_host_mount": str(self.disable_host_mount),
}
DEFAULT_ENGINE = OCIContainerEngineConfig("docker")
@@ -137,7 +153,7 @@ class OCIContainer:
"--env=SOURCE_DATE_EPOCH",
f"--name={self.name}",
"--interactive",
"--volume=/:/host", # ignored on CircleCI
*(["--volume=/:/host"] if not self.engine.disable_host_mount else []),
*network_args,
*self.engine.create_args,
self.image,
+3
View File
@@ -378,6 +378,9 @@ def _inner_fmt(k: str, v: Any, table: TableFmt) -> Iterator[str]:
for inner_v in v:
qv = quote_function(inner_v)
yield table["item"].format(k=k, v=qv)
elif isinstance(v, bool):
qv = quote_function(str(v))
yield table["item"].format(k=k, v=qv)
else:
qv = quote_function(v)
yield table["item"].format(k=k, v=qv)
+18 -18
View File
@@ -97,19 +97,19 @@ python_configurations = [
{ identifier = "cp310-macosx_x86_64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg" },
{ identifier = "cp310-macosx_arm64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg" },
{ identifier = "cp310-macosx_universal2", version = "3.10", url = "https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg" },
{ identifier = "cp311-macosx_x86_64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.7/python-3.11.7-macos11.pkg" },
{ identifier = "cp311-macosx_arm64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.7/python-3.11.7-macos11.pkg" },
{ identifier = "cp311-macosx_universal2", version = "3.11", url = "https://www.python.org/ftp/python/3.11.7/python-3.11.7-macos11.pkg" },
{ identifier = "cp312-macosx_x86_64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.1/python-3.12.1-macos11.pkg" },
{ identifier = "cp312-macosx_arm64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.1/python-3.12.1-macos11.pkg" },
{ identifier = "cp312-macosx_universal2", version = "3.12", url = "https://www.python.org/ftp/python/3.12.1/python-3.12.1-macos11.pkg" },
{ identifier = "cp311-macosx_x86_64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.8/python-3.11.8-macos11.pkg" },
{ identifier = "cp311-macosx_arm64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.8/python-3.11.8-macos11.pkg" },
{ identifier = "cp311-macosx_universal2", version = "3.11", url = "https://www.python.org/ftp/python/3.11.8/python-3.11.8-macos11.pkg" },
{ identifier = "cp312-macosx_x86_64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.2/python-3.12.2-macos11.pkg" },
{ identifier = "cp312-macosx_arm64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.2/python-3.12.2-macos11.pkg" },
{ identifier = "cp312-macosx_universal2", version = "3.12", url = "https://www.python.org/ftp/python/3.12.2/python-3.12.2-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" },
{ identifier = "pp39-macosx_x86_64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.14-macos_x86_64.tar.bz2" },
{ identifier = "pp39-macosx_arm64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.14-macos_arm64.tar.bz2" },
{ identifier = "pp310-macosx_x86_64", version = "3.10", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.14-macos_x86_64.tar.bz2" },
{ identifier = "pp310-macosx_arm64", version = "3.10", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.14-macos_arm64.tar.bz2" },
{ identifier = "pp39-macosx_x86_64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.15-macos_x86_64.tar.bz2" },
{ identifier = "pp39-macosx_arm64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.15-macos_arm64.tar.bz2" },
{ identifier = "pp310-macosx_x86_64", version = "3.10", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.15-macos_x86_64.tar.bz2" },
{ identifier = "pp310-macosx_arm64", version = "3.10", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.15-macos_arm64.tar.bz2" },
]
[windows]
@@ -124,16 +124,16 @@ python_configurations = [
{ identifier = "cp39-win_amd64", version = "3.9.13", arch = "64" },
{ identifier = "cp310-win32", version = "3.10.11", arch = "32" },
{ identifier = "cp310-win_amd64", version = "3.10.11", arch = "64" },
{ identifier = "cp311-win32", version = "3.11.7", arch = "32" },
{ identifier = "cp311-win_amd64", version = "3.11.7", arch = "64" },
{ identifier = "cp312-win32", version = "3.12.1", arch = "32" },
{ identifier = "cp312-win_amd64", version = "3.12.1", arch = "64" },
{ identifier = "cp311-win32", version = "3.11.8", arch = "32" },
{ identifier = "cp311-win_amd64", version = "3.11.8", arch = "64" },
{ identifier = "cp312-win32", version = "3.12.2", arch = "32" },
{ identifier = "cp312-win_amd64", version = "3.12.2", 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.7", arch = "ARM64" },
{ identifier = "cp312-win_arm64", version = "3.12.1", arch = "ARM64" },
{ identifier = "cp311-win_arm64", version = "3.11.8", arch = "ARM64" },
{ identifier = "cp312-win_arm64", version = "3.12.2", 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.14-win64.zip" },
{ identifier = "pp310-win_amd64", version = "3.10", arch = "64", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.14-win64.zip" },
{ identifier = "pp39-win_amd64", version = "3.9", arch = "64", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.15-win64.zip" },
{ identifier = "pp310-win_amd64", version = "3.10", arch = "64", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.15-win64.zip" },
]
@@ -172,11 +172,11 @@
},
{
"type": "string",
"pattern": "^docker; ?create_args:"
"pattern": "^docker; ?(create_args|disable_host_mount):"
},
{
"type": "string",
"pattern": "^podman; ?create_args:"
"pattern": "^podman; ?(create_args|disable_host_mount):"
},
{
"type": "object",
@@ -196,6 +196,9 @@
"items": {
"type": "string"
}
},
"disable-host-mount": {
"type": "boolean"
}
}
}
@@ -13,10 +13,8 @@ distlib==0.3.8
filelock==3.13.1
# via virtualenv
packaging==23.2
# via
# build
# delocate
platformdirs==4.1.0
# via delocate
platformdirs==4.2.0
# via virtualenv
pyproject-hooks==1.0.0
# via build
@@ -30,5 +28,7 @@ virtualenv==20.25.0
# via -r cibuildwheel/resources/constraints.in
# The following packages are considered to be unsafe in a requirements file:
pip==23.3.2
pip==24.0
# via -r cibuildwheel/resources/constraints.in
setuptools==69.1.0
# via -r cibuildwheel/resources/constraints.in
@@ -13,10 +13,8 @@ distlib==0.3.8
filelock==3.13.1
# via virtualenv
packaging==23.2
# via
# build
# delocate
platformdirs==4.1.0
# via delocate
platformdirs==4.2.0
# via virtualenv
pyproject-hooks==1.0.0
# via build
@@ -26,5 +24,7 @@ virtualenv==20.25.0
# via -r cibuildwheel/resources/constraints.in
# The following packages are considered to be unsafe in a requirements file:
pip==23.3.2
pip==24.0
# via -r cibuildwheel/resources/constraints.in
setuptools==69.1.0
# via -r cibuildwheel/resources/constraints.in
@@ -13,10 +13,8 @@ distlib==0.3.8
filelock==3.13.1
# via virtualenv
packaging==23.2
# via
# build
# delocate
platformdirs==4.1.0
# via delocate
platformdirs==4.2.0
# via virtualenv
pyproject-hooks==1.0.0
# via build
@@ -26,5 +24,7 @@ virtualenv==20.25.0
# via -r cibuildwheel/resources/constraints.in
# The following packages are considered to be unsafe in a requirements file:
pip==23.3.2
pip==24.0
# via -r cibuildwheel/resources/constraints.in
setuptools==69.1.0
# via -r cibuildwheel/resources/constraints.in
@@ -39,5 +39,5 @@ zipp==3.15.0
# via importlib-metadata
# The following packages are considered to be unsafe in a requirements file:
pip==23.3.2
pip==24.0
# via -r cibuildwheel/resources/constraints.in
@@ -15,10 +15,8 @@ filelock==3.13.1
importlib-metadata==7.0.1
# via build
packaging==23.2
# via
# build
# delocate
platformdirs==4.1.0
# via delocate
platformdirs==4.2.0
# via virtualenv
pyproject-hooks==1.0.0
# via build
@@ -34,5 +32,7 @@ zipp==3.17.0
# via importlib-metadata
# The following packages are considered to be unsafe in a requirements file:
pip==23.3.2
pip==24.0
# via -r cibuildwheel/resources/constraints.in
setuptools==69.1.0
# via -r cibuildwheel/resources/constraints.in
@@ -15,10 +15,8 @@ filelock==3.13.1
importlib-metadata==7.0.1
# via build
packaging==23.2
# via
# build
# delocate
platformdirs==4.1.0
# via delocate
platformdirs==4.2.0
# via virtualenv
pyproject-hooks==1.0.0
# via build
@@ -34,5 +32,7 @@ zipp==3.17.0
# via importlib-metadata
# The following packages are considered to be unsafe in a requirements file:
pip==23.3.2
pip==24.0
# via -r cibuildwheel/resources/constraints.in
setuptools==69.1.0
# via -r cibuildwheel/resources/constraints.in
+5 -5
View File
@@ -13,10 +13,8 @@ distlib==0.3.8
filelock==3.13.1
# via virtualenv
packaging==23.2
# via
# build
# delocate
platformdirs==4.1.0
# via delocate
platformdirs==4.2.0
# via virtualenv
pyproject-hooks==1.0.0
# via build
@@ -26,5 +24,7 @@ virtualenv==20.25.0
# via -r cibuildwheel/resources/constraints.in
# The following packages are considered to be unsafe in a requirements file:
pip==23.3.2
pip==24.0
# via -r cibuildwheel/resources/constraints.in
setuptools==69.1.0
# via -r cibuildwheel/resources/constraints.in
+26 -26
View File
@@ -1,54 +1,54 @@
[x86_64]
manylinux1 = quay.io/pypa/manylinux1_x86_64:2023-12-10-cee9633
manylinux1 = quay.io/pypa/manylinux1_x86_64:2024-01-28-7b6687a
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2024-01-08-eb135ed
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2024-02-08-a1b4ddc
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:2024-01-08-eb135ed
musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2024-01-08-eb135ed
musllinux_1_2 = quay.io/pypa/musllinux_1_2_x86_64:2024-01-08-eb135ed
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2024-02-08-a1b4ddc
musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2024-02-08-a1b4ddc
musllinux_1_2 = quay.io/pypa/musllinux_1_2_x86_64:2024-02-08-a1b4ddc
[i686]
manylinux1 = quay.io/pypa/manylinux1_i686:2023-12-10-cee9633
manylinux1 = quay.io/pypa/manylinux1_i686:2024-01-28-7b6687a
manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177
manylinux2014 = quay.io/pypa/manylinux2014_i686:2024-01-08-eb135ed
manylinux2014 = quay.io/pypa/manylinux2014_i686:2024-02-08-a1b4ddc
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463
musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2024-01-08-eb135ed
musllinux_1_2 = quay.io/pypa/musllinux_1_2_i686:2024-01-08-eb135ed
musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2024-02-08-a1b4ddc
musllinux_1_2 = quay.io/pypa/musllinux_1_2_i686:2024-02-08-a1b4ddc
[pypy_x86_64]
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2024-01-08-eb135ed
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2024-02-08-a1b4ddc
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:2024-01-08-eb135ed
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2024-02-08-a1b4ddc
[pypy_i686]
manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177
manylinux2014 = quay.io/pypa/manylinux2014_i686:2024-01-08-eb135ed
manylinux2014 = quay.io/pypa/manylinux2014_i686:2024-02-08-a1b4ddc
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463
[aarch64]
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2024-01-08-eb135ed
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2024-02-08-a1b4ddc
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-12-26-0d38463
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2024-01-08-eb135ed
musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2024-01-08-eb135ed
musllinux_1_2 = quay.io/pypa/musllinux_1_2_aarch64:2024-01-08-eb135ed
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2024-02-08-a1b4ddc
musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2024-02-08-a1b4ddc
musllinux_1_2 = quay.io/pypa/musllinux_1_2_aarch64:2024-02-08-a1b4ddc
[ppc64le]
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2024-01-08-eb135ed
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2024-02-08-a1b4ddc
manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-12-26-0d38463
manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2024-01-08-eb135ed
musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2024-01-08-eb135ed
musllinux_1_2 = quay.io/pypa/musllinux_1_2_ppc64le:2024-01-08-eb135ed
manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2024-02-08-a1b4ddc
musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2024-02-08-a1b4ddc
musllinux_1_2 = quay.io/pypa/musllinux_1_2_ppc64le:2024-02-08-a1b4ddc
[s390x]
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2024-01-08-eb135ed
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2024-02-08-a1b4ddc
manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-12-26-0d38463
manylinux_2_28 = quay.io/pypa/manylinux_2_28_s390x:2024-01-08-eb135ed
musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2024-01-08-eb135ed
musllinux_1_2 = quay.io/pypa/musllinux_1_2_s390x:2024-01-08-eb135ed
manylinux_2_28 = quay.io/pypa/manylinux_2_28_s390x:2024-02-08-a1b4ddc
musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2024-02-08-a1b4ddc
musllinux_1_2 = quay.io/pypa/musllinux_1_2_s390x:2024-02-08-a1b4ddc
[pypy_aarch64]
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2024-01-08-eb135ed
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2024-02-08-a1b4ddc
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-12-26-0d38463
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2024-01-08-eb135ed
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2024-02-08-a1b4ddc
+2 -2
View File
@@ -738,7 +738,7 @@ def parse_key_value_string(
# 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)
result: defaultdict[str, list[str]] = defaultdict(list)
for field_i, field in enumerate(fields):
# check to see if the option name is specified
field_name, sep, first_value = field[0].partition(":")
@@ -759,4 +759,4 @@ def parse_key_value_string(
result[field_name] += values
return result
return dict(result)