1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Refactor --build-option declaration

This commit is contained in:
Stéphane Bidoul 2021-01-03 13:26:28 +01:00
parent 5e072e2ecc
commit d53ddb9380
2 changed files with 10 additions and 7 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",

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,6 +74,7 @@ class WheelCommand(RequirementCommand):
help="Don't verify if built wheel is valid.",
)
self.cmd_opts.add_option(cmdoptions.build_options())
self.cmd_opts.add_option(
'--global-option',
dest='global_options',