Add prog arguments to ArgumentParser to prevent the wrong inferred name
when calling like 'python -m cibuildwheel', we get errors like
usage: __main__.py [-h] [--platform {auto,linux,macos,windows}] [--archs ARCHS] [--output-dir OUTPUT_DIR] [--config-file CONFIG_FILE]
[--print-build-identifiers] [--allow-empty] [--prerelease-pythons]
[package_dir]
__main__.py: error: unrecognized arguments: --sad
With this change, we get error outputs like:
usage: cibuildwheel [-h] [--platform {auto,linux,macos,windows}] [--archs ARCHS] [--output-dir OUTPUT_DIR] [--config-file CONFIG_FILE]
[--print-build-identifiers] [--allow-empty] [--prerelease-pythons]
[package_dir]
cibuildwheel: error: unrecognized arguments: --asda
This commit is contained in:
@@ -28,6 +28,7 @@ def main() -> None:
|
||||
platform: PlatformName
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
prog="cibuildwheel",
|
||||
description="Build wheels for all the platforms.",
|
||||
epilog="""
|
||||
Most options are supplied via environment variables or in
|
||||
|
||||
@@ -11,6 +11,7 @@ from cibuildwheel.util import format_safe
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(
|
||||
prog="cibuildwheel-from-sdist",
|
||||
description=textwrap.dedent(
|
||||
"""
|
||||
Build wheels from an sdist archive.
|
||||
|
||||
Reference in New Issue
Block a user