Skip to content

Commit

Permalink
Merge pull request #4048 from techtonik/insttype
Browse files Browse the repository at this point in the history
Group package selection options together
  • Loading branch information
xavfernandez authored Jan 28, 2017
2 parents 1b0df50 + cec5814 commit 672e88a
Showing 1 changed file with 27 additions and 30 deletions.
57 changes: 27 additions & 30 deletions pip/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ def __init__(self, *args, **kw):

cmd_opts = self.cmd_opts

cmd_opts.add_option(cmdoptions.constraints())
cmd_opts.add_option(cmdoptions.editable())
cmd_opts.add_option(cmdoptions.requirements())
cmd_opts.add_option(cmdoptions.build_dir())
cmd_opts.add_option(cmdoptions.constraints())
cmd_opts.add_option(cmdoptions.no_deps())
cmd_opts.add_option(cmdoptions.pre())

cmd_opts.add_option(cmdoptions.editable())
cmd_opts.add_option(
'-t', '--target',
dest='target_dir',
Expand All @@ -71,6 +72,28 @@ def __init__(self, *args, **kw):
'<dir>. Use --upgrade to replace existing packages in <dir> '
'with new versions.'
)
cmd_opts.add_option(
'--user',
dest='use_user_site',
action='store_true',
help="Install to the Python user install directory for your "
"platform. Typically ~/.local/, or %APPDATA%\Python on "
"Windows. (See the Python documentation for site.USER_BASE "
"for full details.)")
cmd_opts.add_option(
'--root',
dest='root_path',
metavar='dir',
default=None,
help="Install everything relative to this alternate root "
"directory.")
cmd_opts.add_option(
'--prefix',
dest='prefix_path',
metavar='dir',
default=None,
help="Installation prefix where lib, bin and other top-level "
"folders are placed")

cmd_opts.add_option(
'-d', '--download', '--download-dir', '--download-directory',
Expand All @@ -80,6 +103,7 @@ def __init__(self, *args, **kw):
help=("Download packages into <dir> instead of installing them, "
"regardless of what's already installed."),
)
cmd_opts.add_option(cmdoptions.build_dir())

cmd_opts.add_option(cmdoptions.src())

Expand Down Expand Up @@ -120,20 +144,10 @@ def __init__(self, *args, **kw):
help='Ignore the installed packages (reinstalling instead).')

cmd_opts.add_option(cmdoptions.ignore_requires_python())
cmd_opts.add_option(cmdoptions.no_deps())

cmd_opts.add_option(cmdoptions.install_options())
cmd_opts.add_option(cmdoptions.global_options())

cmd_opts.add_option(
'--user',
dest='use_user_site',
action='store_true',
help="Install to the Python user install directory for your "
"platform. Typically ~/.local/, or %APPDATA%\Python on "
"Windows. (See the Python documentation for site.USER_BASE "
"for full details.)")

cmd_opts.add_option(
'--egg',
dest='as_egg',
Expand All @@ -143,22 +157,6 @@ def __init__(self, *args, **kw):
"(WARNING: Because this option overrides pip's normal install"
" logic, requirements files may not behave as expected.)")

cmd_opts.add_option(
'--root',
dest='root_path',
metavar='dir',
default=None,
help="Install everything relative to this alternate root "
"directory.")

cmd_opts.add_option(
'--prefix',
dest='prefix_path',
metavar='dir',
default=None,
help="Installation prefix where lib, bin and other top-level "
"folders are placed")

cmd_opts.add_option(
"--compile",
action="store_true",
Expand All @@ -178,7 +176,6 @@ def __init__(self, *args, **kw):
cmd_opts.add_option(cmdoptions.no_use_wheel())
cmd_opts.add_option(cmdoptions.no_binary())
cmd_opts.add_option(cmdoptions.only_binary())
cmd_opts.add_option(cmdoptions.pre())
cmd_opts.add_option(cmdoptions.no_clean())
cmd_opts.add_option(cmdoptions.require_hashes())

Expand Down

0 comments on commit 672e88a

Please sign in to comment.