Merge pull request #9776 from sbidoul/ref-build-option-sbi

Refactoring of --build-option and --global-option declaration in wheel command
This commit is contained in:
Stéphane Bidoul 2021-04-07 14:13:55 +02:00 committed by GitHub
commit 0770b6aeb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 15 deletions

View File

@ -824,6 +824,15 @@ install_options = partial(
"directory path, be sure to use absolute path.",
) # type: Callable[..., Option]
build_options = partial(
Option,
"--build-option",
dest="build_options",
metavar="options",
action="append",
help="Extra arguments to be supplied to 'setup.py bdist_wheel'.",
) # type: Callable[..., Option]
global_options = partial(
Option,
"--global-option",
@ -831,7 +840,7 @@ global_options = partial(
action="append",
metavar="options",
help="Extra global options to be supplied to the setup.py "
"call before the install command.",
"call before the install or bdist_wheel command.",
) # type: Callable[..., Option]
no_clean = partial(

View File

@ -54,13 +54,6 @@ class WheelCommand(RequirementCommand):
self.cmd_opts.add_option(cmdoptions.no_binary())
self.cmd_opts.add_option(cmdoptions.only_binary())
self.cmd_opts.add_option(cmdoptions.prefer_binary())
self.cmd_opts.add_option(
'--build-option',
dest='build_options',
metavar='options',
action='append',
help="Extra arguments to be supplied to 'setup.py bdist_wheel'.",
)
self.cmd_opts.add_option(cmdoptions.no_build_isolation())
self.cmd_opts.add_option(cmdoptions.use_pep517())
self.cmd_opts.add_option(cmdoptions.no_use_pep517())
@ -81,13 +74,8 @@ class WheelCommand(RequirementCommand):
help="Don't verify if built wheel is valid.",
)
self.cmd_opts.add_option(
'--global-option',
dest='global_options',
action='append',
metavar='options',
help="Extra global options to be supplied to the setup.py "
"call before the 'bdist_wheel' command.")
self.cmd_opts.add_option(cmdoptions.build_options())
self.cmd_opts.add_option(cmdoptions.global_options())
self.cmd_opts.add_option(
'--pre',