Refer to --archs by its real name in help, error message and docs (#2992)

Refer to --archs by its real name in help, error and docs

The --only help text, the --only/--archs conflict error and the platform
section of docs/options.md all name a --arch option. The parser defines
--archs and sets allow_abbrev=False, so --arch is rejected as an
unrecognized argument.

Co-authored-by: hxperl <[email protected]>
This commit is contained in:
geonseok
2026-09-15 20:45:39 -04:00
committed by GitHub
co-authored by hxperl
parent 2305cf9ae6
commit 8bb4f7b2d5
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -153,7 +153,7 @@ def main_inner(global_options: GlobalOptions) -> None:
metavar="IDENTIFIER",
help="""
Force a single wheel build when given an identifier. Overrides
CIBW_BUILD/CIBW_SKIP. --platform and --arch cannot be specified
CIBW_BUILD/CIBW_SKIP. --platform and --archs cannot be specified
if this is given.
""",
)
@@ -323,7 +323,7 @@ def _compute_platform(args: CommandLineArguments) -> PlatformName:
msg = "--platform cannot be specified with --only, it is computed from --only"
raise errors.ConfigurationError(msg)
if args.only and args.archs is not None:
msg = "--arch cannot be specified with --only, it is computed from --only"
msg = "--archs cannot be specified with --only, it is computed from --only"
raise errors.ConfigurationError(msg)
if platform_option_value not in PLATFORMS | {"auto"}:
+1 -1
View File
@@ -43,7 +43,7 @@ This option can also be set using the [command-line option](#command-line) `--pl
This is even more convenient if you store your cibuildwheel config in [`pyproject.toml`](configuration.md#configuration-file).
You can also run a single identifier with `--only <identifier>`. This will
not require `--platform` or `--arch`, and will override any build/skip
not require `--platform` or `--archs`, and will override any build/skip
configuration.
### `build`, `skip` {: #build-skip toml env-var }