diff --git a/cibuildwheel/platforms/android.py b/cibuildwheel/platforms/android.py index 3a1cc1b2..032d7730 100644 --- a/cibuildwheel/platforms/android.py +++ b/cibuildwheel/platforms/android.py @@ -349,7 +349,11 @@ def localized_vars( final = final.replace(orig_prefix, str(prefix)) if key == "ANDROID_API_LEVEL": - final = int(build_env[key]) + try: + final = int(build_env[key]) + except ValueError as e: + msg = f"ANDROID_API_LEVEL: {e}. This variable must be an integer." + raise errors.FatalError(msg) from e # Build systems vary in whether FLAGS variables are read from sysconfig, and if so, # whether they're replaced by environment variables or combined with them. Even diff --git a/cibuildwheel/venv.py b/cibuildwheel/venv.py index 10f49491..68404cac 100644 --- a/cibuildwheel/venv.py +++ b/cibuildwheel/venv.py @@ -84,7 +84,7 @@ def _parse_pip_constraint_for_virtualenv( If it can't get an exact version, the real constraint will be handled by the {macos|windows}.setup_python function. If marker_env is provided, marker-bearing constraints are evaluated against it; - otherwise, marker-bearing constraints are skipped. + otherwise, they are evaluated against the host's default environment. """ env: dict[str, str] = ( marker_env if marker_env is not None else cast("dict[str, str]", default_environment()) diff --git a/docs/faq.md b/docs/faq.md index c8a12b01..d71ef2b5 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -235,7 +235,7 @@ Sometimes a build will fail due to a missing dependency. **If you need a build tool** (e.g. cmake, automake, ninja), you can install it through a package manager like apt/yum, brew or choco, using the [`before-all`](options.md#before-all) option. -**If your build is linking into a native library dependency**, you can build/install that in [`before-all`](options.md#before-all). However, on Linux, Mac (and Windows if you're using [delvewheel]), the library that you install will be bundled into the wheel in the [repair step]. So take care to ensure that +**If your build is linking into a native library dependency**, you can build/install that in [`before-all`](options.md#before-all). However, on Linux, Mac, and Windows (which uses [delvewheel] by default since cibuildwheel 4.0), the library that you install will be bundled into the wheel in the [repair step]. So take care to ensure that - the bundled library doesn't accidentally increase the minimum system requirements (such as the minimum macOS version) - the bundled library matches the architecture of the wheel you're building when cross-compiling diff --git a/docs/options.md b/docs/options.md index 7a8b84fb..c18e8afe 100644 --- a/docs/options.md +++ b/docs/options.md @@ -971,6 +971,9 @@ Default: A shell command to repair a built wheel by copying external library dependencies into the wheel tree and relinking them. The command is run on each built wheel (except for pure Python ones) before testing it. +!!! note + Since cibuildwheel 4.0, `delvewheel` is the default `repair-wheel-command` on Windows, so extension-module DLLs are bundled automatically. If a wheel has a platform tag but contains no extension module (for example, a package that sets a platform tag but ships a pre-built DLL itself), `delvewheel` may error. In that case, set `repair-wheel-command = ""` to skip the repair step. + The following placeholders must be used inside the command and will be replaced by cibuildwheel: - `{wheel}` for the absolute path to the built wheel