Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a0a78b4
Use auditwheel on Android
mhsmith Dec 16, 2025
2996c10
Add auditwheel command to defaults
mhsmith Dec 16, 2025
f650f03
pkgconfig fixes
mhsmith Dec 16, 2025
5f509e2
Pre-import ctypes before monkey-patching in _cross_venv
mhsmith Dec 18, 2025
9d560ae
Set PKG_CONFIG and PKG_CONFIG_RELOCATE_PATHS variables
mhsmith Jan 9, 2026
93053e7
Initial attempt at using mzakharo/android-gfortran
mhsmith Jan 9, 2026
926da78
Switch to using termux/ndk-toolchain-clang-with-flang
mhsmith Jan 10, 2026
e996cd7
Move PKG_CONFIG variables from build_env to android_env
mhsmith Jan 11, 2026
bceed3c
Simplify flang installation
mhsmith Jan 11, 2026
488fd25
Add cross build files for NumPy
mhsmith Jan 11, 2026
4331036
Add ldpaths entry for libomp
mhsmith Jan 12, 2026
cfda2c3
Add `--rm` to docker command line
mhsmith Jan 29, 2026
0f4f0b6
Merge remote-tracking branch 'origin/main' into android-numpy
mhsmith Jan 29, 2026
d175c12
Make Rust and Fortran shims consistent
mhsmith Jan 29, 2026
f188500
Update documentation
mhsmith Jan 29, 2026
3e806fa
Default to API level 24 on all Python versions
mhsmith Mar 22, 2026
b9391ae
Clarify comments
mhsmith Mar 22, 2026
79ad3c1
Merge remote-tracking branch 'origin/main' into android-numpy
mhsmith Mar 22, 2026
0ce01a1
Cleanups
mhsmith Mar 22, 2026
ff7942c
Fix tests:
mhsmith Mar 22, 2026
dddd024
Merge remote-tracking branch 'origin/main' into android-numpy
mhsmith Apr 10, 2026
1bb5e30
Update how-it-works diagram
mhsmith Apr 10, 2026
4b4da1b
Add tests for repair errors
mhsmith Apr 11, 2026
a731324
Merge remote-tracking branch 'origin/main' into android-numpy
mhsmith Apr 13, 2026
42013b0
Merge remote-tracking branch 'origin/main' into android-numpy
mhsmith Apr 16, 2026
5d4073b
Add more repair tests
mhsmith Apr 16, 2026
d65ce93
Add test for Meson and Fortran
mhsmith Apr 17, 2026
db2a50e
Add test for cross build files
mhsmith Apr 17, 2026
b9bbcc8
Improve test_api_level error message
mhsmith Apr 27, 2026
77ce08b
Add xbuild-files option
mhsmith Apr 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ The following diagram summarises the steps that cibuildwheel takes on each platf
| | [`before-all`](https://cibuildwheel.pypa.io/en/stable/options/#before-all) | Execute a shell command on the build system before any wheels are built. |
| | [`before-build`](https://cibuildwheel.pypa.io/en/stable/options/#before-build) | Execute a shell command preparing each wheel's build |
| | [`xbuild-tools`](https://cibuildwheel.pypa.io/en/stable/options/#xbuild-tools) | Binaries on the path that should be included in an isolated cross-build environment. |
| | [`xbuild-files`](https://cibuildwheel.pypa.io/en/stable/options/#xbuild-files) | Platform-specific files in the build environment |
| | [`repair-wheel-command`](https://cibuildwheel.pypa.io/en/stable/options/#repair-wheel-command) | Execute a shell command to repair each built wheel |
| | [`manylinux-*-image`<br>`musllinux-*-image`](https://cibuildwheel.pypa.io/en/stable/options/#linux-image) | Specify manylinux / musllinux container images |
| | [`container-engine`](https://cibuildwheel.pypa.io/en/stable/options/#container-engine) | Specify the container engine to use when building Linux wheels |
Expand All @@ -170,7 +171,7 @@ The following diagram summarises the steps that cibuildwheel takes on each platf
| | [`build-verbosity`](https://cibuildwheel.pypa.io/en/stable/options/#build-verbosity) | Increase/decrease the output of the build |


<!--[[[end]]] (sum: dbfwOkj/k/) -->
<!--[[[end]]] (sum: 0/raR2tq9e) -->

These options can be specified in a pyproject.toml file, or as environment variables, see [configuration docs](https://cibuildwheel.pypa.io/en/latest/configuration/).

Expand Down
23 changes: 15 additions & 8 deletions bin/generate_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
parser.add_argument("--schemastore", action="store_true", help="Generate schema_store version")
args = parser.parse_args()

# The defaults in the schema are used by external tools for validation and IDE support. They
# should match the values in defaults.toml, which are used by cibuildwheel itself.
starter = """
$schema: http://json-schema.org/draft-07/schema#
$id: https://github.com/pypa/cibuildwheel/blob/main/cibuildwheel/resources/cibuildwheel.schema.json
Expand Down Expand Up @@ -195,6 +197,9 @@
xbuild-tools:
description: Binaries on the path that should be included in an isolated cross-build environment
type: string_array
xbuild-files:
description: Platform-specific files in the build environment
type: string_table_array
pyodide-version:
type: string
description: Specify the version of Pyodide to use
Expand Down Expand Up @@ -312,6 +317,7 @@
before-all: {"$ref": "#/$defs/inherit"}
before-build: {"$ref": "#/$defs/inherit"}
xbuild-tools: {"$ref": "#/$defs/inherit"}
xbuild-files: {"$ref": "#/$defs/inherit"}
before-test: {"$ref": "#/$defs/inherit"}
config-settings: {"$ref": "#/$defs/inherit"}
container-engine: {"$ref": "#/$defs/inherit"}
Expand Down Expand Up @@ -367,14 +373,15 @@ def as_object(d: dict[str, Any]) -> dict[str, Any]:
"ios": as_object(not_linux),
}

oses["linux"]["properties"]["repair-wheel-command"] = {
**schema["properties"]["repair-wheel-command"],
"default": "auditwheel repair -w {dest_dir} {wheel}",
}
oses["macos"]["properties"]["repair-wheel-command"] = {
**schema["properties"]["repair-wheel-command"],
"default": "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}",
}
for os_name, command in [
("linux", "auditwheel repair -w {dest_dir} {wheel}"),
("macos", "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"),
("android", "auditwheel repair --ldpaths {ldpaths} -w {dest_dir} {wheel}"),
]:
oses[os_name]["properties"]["repair-wheel-command"] = {
**schema["properties"]["repair-wheel-command"],
"default": command,
}

del oses["linux"]["properties"]["dependency-versions"]

Expand Down
10 changes: 10 additions & 0 deletions cibuildwheel/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class BuildOptions:
before_all: str
before_build: str | None
xbuild_tools: list[str] | None
xbuild_files: dict[str, list[str]]
repair_command: str
manylinux_images: dict[str, str] | None
musllinux_images: dict[str, str] | None
Expand Down Expand Up @@ -764,6 +765,14 @@ def _compute_build_options(self, identifier: str | None) -> BuildOptions:
if xbuild_tools == ["\u0000"]:
xbuild_tools = None

xbuild_files = parse_key_value_string(
self.reader.get(
"xbuild-files",
option_format=ShlexTableFormat(sep="; ", pair_sep=":", allow_merge=False),
),
kw_arg_names=["*"],
)

test_sources = shlex.split(
self.reader.get(
"test-sources", option_format=ListFormat(sep=" ", quote=shlex.quote)
Expand Down Expand Up @@ -908,6 +917,7 @@ def _compute_build_options(self, identifier: str | None) -> BuildOptions:
before_all=before_all,
build_verbosity=build_verbosity,
xbuild_tools=xbuild_tools,
xbuild_files=xbuild_files,
repair_command=repair_command,
environment=environment,
dependency_constraints=dependency_constraints,
Expand Down
Loading
Loading