fix: verbosity isn't supported for pypa/build (#1474)
This was incorrectly adding an empty config setting, and it was not correct if included for build - it's a pip wheel only setting. Reported in #1471. Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
@@ -242,11 +242,10 @@ def build_in_container(
|
|||||||
container.call(["rm", "-rf", built_wheel_dir])
|
container.call(["rm", "-rf", built_wheel_dir])
|
||||||
container.call(["mkdir", "-p", 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)
|
extra_flags = split_config_settings(build_options.config_settings, build_frontend)
|
||||||
|
|
||||||
if build_frontend == "pip":
|
if build_frontend == "pip":
|
||||||
extra_flags += verbosity_flags
|
extra_flags += get_build_verbosity_extra_flags(build_options.build_verbosity)
|
||||||
container.call(
|
container.call(
|
||||||
[
|
[
|
||||||
"python",
|
"python",
|
||||||
@@ -261,8 +260,9 @@ def build_in_container(
|
|||||||
env=env,
|
env=env,
|
||||||
)
|
)
|
||||||
elif build_frontend == "build":
|
elif build_frontend == "build":
|
||||||
verbosity_setting = " ".join(verbosity_flags)
|
if not 0 <= build_options.build_verbosity < 2:
|
||||||
extra_flags += (f"--config-setting={verbosity_setting}",)
|
msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring."
|
||||||
|
log.warning(msg)
|
||||||
container.call(
|
container.call(
|
||||||
[
|
[
|
||||||
"python",
|
"python",
|
||||||
|
|||||||
@@ -376,11 +376,10 @@ def build(options: Options, tmp_path: Path) -> None:
|
|||||||
log.step("Building wheel...")
|
log.step("Building wheel...")
|
||||||
built_wheel_dir.mkdir()
|
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)
|
extra_flags = split_config_settings(build_options.config_settings, build_frontend)
|
||||||
|
|
||||||
if build_frontend == "pip":
|
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
|
# Path.resolve() is needed. Without it pip wheel may try to fetch package from pypi.org
|
||||||
# see https://github.com/pypa/cibuildwheel/pull/369
|
# see https://github.com/pypa/cibuildwheel/pull/369
|
||||||
call(
|
call(
|
||||||
@@ -395,8 +394,9 @@ def build(options: Options, tmp_path: Path) -> None:
|
|||||||
env=env,
|
env=env,
|
||||||
)
|
)
|
||||||
elif build_frontend == "build":
|
elif build_frontend == "build":
|
||||||
verbosity_setting = " ".join(verbosity_flags)
|
if not 0 <= build_options.build_verbosity < 2:
|
||||||
extra_flags += (f"--config-setting={verbosity_setting}",)
|
msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring."
|
||||||
|
log.warning(msg)
|
||||||
build_env = env.copy()
|
build_env = env.copy()
|
||||||
if build_options.dependency_constraints:
|
if build_options.dependency_constraints:
|
||||||
constraint_path = (
|
constraint_path = (
|
||||||
|
|||||||
@@ -414,11 +414,10 @@ def build(options: Options, tmp_path: Path) -> None:
|
|||||||
log.step("Building wheel...")
|
log.step("Building wheel...")
|
||||||
built_wheel_dir.mkdir()
|
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)
|
extra_flags = split_config_settings(build_options.config_settings, build_frontend)
|
||||||
|
|
||||||
if build_frontend == "pip":
|
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
|
# Path.resolve() is needed. Without it pip wheel may try to fetch package from pypi.org
|
||||||
# see https://github.com/pypa/cibuildwheel/pull/369
|
# see https://github.com/pypa/cibuildwheel/pull/369
|
||||||
call(
|
call(
|
||||||
@@ -433,8 +432,9 @@ def build(options: Options, tmp_path: Path) -> None:
|
|||||||
env=env,
|
env=env,
|
||||||
)
|
)
|
||||||
elif build_frontend == "build":
|
elif build_frontend == "build":
|
||||||
verbosity_setting = " ".join(verbosity_flags)
|
if not 0 <= build_options.build_verbosity < 2:
|
||||||
extra_flags += (f"--config-setting={verbosity_setting}",)
|
msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring."
|
||||||
|
log.warning(msg)
|
||||||
build_env = env.copy()
|
build_env = env.copy()
|
||||||
if build_options.dependency_constraints:
|
if build_options.dependency_constraints:
|
||||||
constraints_path = (
|
constraints_path = (
|
||||||
|
|||||||
+1
-1
@@ -1393,7 +1393,7 @@ This option is not supported in the overrides section in `pyproject.toml`.
|
|||||||
### `CIBW_BUILD_VERBOSITY` {: #build-verbosity}
|
### `CIBW_BUILD_VERBOSITY` {: #build-verbosity}
|
||||||
> Increase/decrease the output of pip wheel
|
> 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:<br/>
|
Platform-specific environment variables are also available:<br/>
|
||||||
`CIBW_BUILD_VERBOSITY_MACOS` | `CIBW_BUILD_VERBOSITY_WINDOWS` | `CIBW_BUILD_VERBOSITY_LINUX`
|
`CIBW_BUILD_VERBOSITY_MACOS` | `CIBW_BUILD_VERBOSITY_WINDOWS` | `CIBW_BUILD_VERBOSITY_LINUX`
|
||||||
|
|||||||
Reference in New Issue
Block a user