diff --git a/cibuildwheel/linux.py b/cibuildwheel/linux.py index 8c584b20..eb878d8d 100644 --- a/cibuildwheel/linux.py +++ b/cibuildwheel/linux.py @@ -242,11 +242,10 @@ def build_in_container( container.call(["rm", "-rf", built_wheel_dir]) container.call(["mkdir", "-p", built_wheel_dir]) - verbosity_flags = get_build_verbosity_extra_flags(build_options.build_verbosity) extra_flags = split_config_settings(build_options.config_settings, build_frontend) if build_frontend == "pip": - extra_flags += verbosity_flags + extra_flags += get_build_verbosity_extra_flags(build_options.build_verbosity) container.call( [ "python", @@ -261,8 +260,9 @@ def build_in_container( env=env, ) elif build_frontend == "build": - verbosity_setting = " ".join(verbosity_flags) - extra_flags += (f"--config-setting={verbosity_setting}",) + if not 0 <= build_options.build_verbosity < 2: + msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring." + log.warning(msg) container.call( [ "python", diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 3cf4ec53..24d22e46 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -376,11 +376,10 @@ def build(options: Options, tmp_path: Path) -> None: log.step("Building wheel...") built_wheel_dir.mkdir() - verbosity_flags = get_build_verbosity_extra_flags(build_options.build_verbosity) extra_flags = split_config_settings(build_options.config_settings, build_frontend) if build_frontend == "pip": - extra_flags += verbosity_flags + extra_flags += get_build_verbosity_extra_flags(build_options.build_verbosity) # Path.resolve() is needed. Without it pip wheel may try to fetch package from pypi.org # see https://github.com/pypa/cibuildwheel/pull/369 call( @@ -395,8 +394,9 @@ def build(options: Options, tmp_path: Path) -> None: env=env, ) elif build_frontend == "build": - verbosity_setting = " ".join(verbosity_flags) - extra_flags += (f"--config-setting={verbosity_setting}",) + if not 0 <= build_options.build_verbosity < 2: + msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring." + log.warning(msg) build_env = env.copy() if build_options.dependency_constraints: constraint_path = ( diff --git a/cibuildwheel/windows.py b/cibuildwheel/windows.py index 9d2ed1f1..2c0df37f 100644 --- a/cibuildwheel/windows.py +++ b/cibuildwheel/windows.py @@ -414,11 +414,10 @@ def build(options: Options, tmp_path: Path) -> None: log.step("Building wheel...") built_wheel_dir.mkdir() - verbosity_flags = get_build_verbosity_extra_flags(build_options.build_verbosity) extra_flags = split_config_settings(build_options.config_settings, build_frontend) if build_frontend == "pip": - extra_flags += verbosity_flags + extra_flags += get_build_verbosity_extra_flags(build_options.build_verbosity) # Path.resolve() is needed. Without it pip wheel may try to fetch package from pypi.org # see https://github.com/pypa/cibuildwheel/pull/369 call( @@ -433,8 +432,9 @@ def build(options: Options, tmp_path: Path) -> None: env=env, ) elif build_frontend == "build": - verbosity_setting = " ".join(verbosity_flags) - extra_flags += (f"--config-setting={verbosity_setting}",) + if not 0 <= build_options.build_verbosity < 2: + msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring." + log.warning(msg) build_env = env.copy() if build_options.dependency_constraints: constraints_path = ( diff --git a/docs/options.md b/docs/options.md index 92371b04..1d1dfaf6 100644 --- a/docs/options.md +++ b/docs/options.md @@ -1393,7 +1393,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. +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. Platform-specific environment variables are also available:
`CIBW_BUILD_VERBOSITY_MACOS` | `CIBW_BUILD_VERBOSITY_WINDOWS` | `CIBW_BUILD_VERBOSITY_LINUX`