Orbits  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Classes | Functions | Variables
pip.cmdoptions Namespace Reference

Classes

class  OptionMaker
 

Functions

def make_option_group
 

Variables

tuple help_
 
tuple require_virtualenv
 
tuple verbose
 
tuple version
 
tuple quiet
 
tuple log
 
tuple log_explicit_levels
 
tuple log_file
 
tuple no_input
 
tuple proxy
 
tuple timeout
 
tuple default_vcs
 
tuple skip_requirements_regex
 
tuple exists_action
 
tuple cert
 
tuple index_url
 
tuple extra_index_url
 
tuple no_index
 
tuple find_links
 
tuple use_mirrors
 
tuple mirrors
 
tuple allow_external
 
tuple allow_all_external
 
tuple no_allow_external
 
tuple allow_unsafe
 
tuple no_allow_unsafe
 
tuple process_dependency_links
 
tuple requirements
 
tuple use_wheel
 
tuple no_use_wheel
 
tuple download_cache
 
tuple no_deps
 
tuple build_dir
 
tuple install_options
 
tuple global_options
 
tuple no_clean
 
dictionary general_group
 groups # More...
 
dictionary index_group
 

Detailed Description

shared options and groups

The principle here is to define options once, but *not* instantiate them globally.
One reason being that options with action='append' can carry state between parses.
pip parse's general options twice internally, and shouldn't pass on state.
To be consistent, all options will follow this design.

Function Documentation

def pip.cmdoptions.make_option_group (   group,
  parser 
)
Return an OptionGroup object
group  -- assumed to be dict with 'name' and 'options' keys
parser -- an optparse Parser

Variable Documentation

tuple pip.cmdoptions.allow_all_external
Initial value:
2  "--allow-all-external",
3  dest="allow_all_external",
4  action="store_true",
5  default=False,
6  help="Allow the installation of all externally hosted files",
7 )
tuple pip.cmdoptions.allow_external
Initial value:
2  "--allow-external",
3  dest="allow_external",
4  action="append",
5  default=[],
6  metavar="PACKAGE",
7  help="Allow the installation of externally hosted files",
8 )
tuple pip.cmdoptions.allow_unsafe
Initial value:
2  "--allow-unverified", "--allow-insecure",
3  dest="allow_unverified",
4  action="append",
5  default=[],
6  metavar="PACKAGE",
7  help="Allow the installation of insecure and unverifiable files",
8 )
tuple pip.cmdoptions.build_dir
Initial value:
2  '-b', '--build', '--build-dir', '--build-directory',
3  dest='build_dir',
4  metavar='dir',
5  default=build_prefix,
6  help='Directory to unpack packages into and build in. '
7  'The default in a virtualenv is "<venv path>/build". '
8  'The default for global installs is "<OS temp dir>/pip_build_<username>".')
tuple pip.cmdoptions.cert
Initial value:
2  '--cert',
3  dest='cert',
4  type='str',
5  default='',
6  metavar='path',
7  help = "Path to alternate CA bundle.")
tuple pip.cmdoptions.default_vcs
Initial value:
2  # The default version control system for editables, e.g. 'svn'
3  '--default-vcs',
4  dest='default_vcs',
5  type='str',
6  default='',
7  help=SUPPRESS_HELP)
tuple pip.cmdoptions.download_cache
Initial value:
2  '--download-cache',
3  dest='download_cache',
4  metavar='dir',
5  default=None,
6  help='Cache downloaded packages in <dir>.')
tuple pip.cmdoptions.exists_action
Initial value:
2  # Option when path already exist
3  '--exists-action',
4  dest='exists_action',
5  type='choice',
6  choices=['s', 'i', 'w', 'b'],
7  default=[],
8  action='append',
9  metavar='action',
10  help="Default action when a path already exists: "
11  "(s)witch, (i)gnore, (w)ipe, (b)ackup.")
tuple pip.cmdoptions.extra_index_url
Initial value:
2  '--extra-index-url',
3  dest='extra_index_urls',
4  metavar='URL',
5  action='append',
6  default=[],
7  help='Extra URLs of package indexes to use in addition to --index-url.')
tuple pip.cmdoptions.find_links
Initial value:
2  '-f', '--find-links',
3  dest='find_links',
4  action='append',
5  default=[],
6  metavar='url',
7  help="If a url or path to an html file, then parse for links to archives. If a local path or file:// url that's a directory, then look for archives in the directory listing.")
dictionary pip.cmdoptions.general_group
Initial value:
1 = {
2  'name': 'General Options',
3  'options': [
4  help_,
5  require_virtualenv,
6  verbose,
7  version,
8  quiet,
9  log_file,
10  log,
11  log_explicit_levels,
12  no_input,
13  proxy,
14  timeout,
15  default_vcs,
16  skip_requirements_regex,
17  exists_action,
18  cert,
19  ]
20  }

groups #

tuple pip.cmdoptions.global_options
Initial value:
2  '--global-option',
3  dest='global_options',
4  action='append',
5  metavar='options',
6  help="Extra global options to be supplied to the setup.py "
7  "call before the install command.")
tuple pip.cmdoptions.help_
Initial value:
2  '-h', '--help',
3  dest='help',
4  action='help',
5  help='Show help.')
dictionary pip.cmdoptions.index_group
Initial value:
1 = {
2  'name': 'Package Index Options',
3  'options': [
4  index_url,
5  extra_index_url,
6  no_index,
7  find_links,
8  use_mirrors,
9  mirrors,
10  allow_external,
11  allow_all_external,
12  no_allow_external,
13  allow_unsafe,
14  no_allow_unsafe,
15  process_dependency_links,
16  ]
17  }
tuple pip.cmdoptions.index_url
Initial value:
2  '-i', '--index-url', '--pypi-url',
3  dest='index_url',
4  metavar='URL',
5  default='https://pypi.python.org/simple/',
6  help='Base URL of Python Package Index (default %default).')
tuple pip.cmdoptions.install_options
Initial value:
2  '--install-option',
3  dest='install_options',
4  action='append',
5  metavar='options',
6  help="Extra arguments to be supplied to the setup.py install "
7  "command (use like --install-option=\"--install-scripts=/usr/local/bin\"). "
8  "Use multiple --install-option options to pass multiple options to setup.py install. "
9  "If you are using an option with a directory path, be sure to use absolute path.")
tuple pip.cmdoptions.log
Initial value:
2  '--log',
3  dest='log',
4  metavar='path',
5  help='Path to a verbose appending log. This log is inactive by default.')
tuple pip.cmdoptions.log_explicit_levels
Initial value:
2  # Writes the log levels explicitely to the log'
3  '--log-explicit-levels',
4  dest='log_explicit_levels',
5  action='store_true',
6  default=False,
7  help=SUPPRESS_HELP)
tuple pip.cmdoptions.log_file
Initial value:
2  # The default log file
3  '--log-file', '--local-log',
4  dest='log_file',
5  metavar='path',
6  default=default_log_file,
7  help='Path to a verbose non-appending log, that only logs failures. This log is active by default at %default.')
tuple pip.cmdoptions.mirrors
Initial value:
2  '--mirrors',
3  dest='mirrors',
4  metavar='URL',
5  action='append',
6  default=[],
7  help=SUPPRESS_HELP)
tuple pip.cmdoptions.no_allow_external
Initial value:
2  "--no-allow-external",
3  dest="allow_all_external",
4  action="store_false",
5  default=False,
6  help=SUPPRESS_HELP,
7 )
tuple pip.cmdoptions.no_allow_unsafe
Initial value:
2  "--no-allow-insecure",
3  dest="allow_all_insecure",
4  action="store_false",
5  default=False,
6  help=SUPPRESS_HELP
7 )
tuple pip.cmdoptions.no_clean
Initial value:
2  '--no-clean',
3  action='store_true',
4  default=False,
5  help="Don't clean up build directories.")
tuple pip.cmdoptions.no_deps
Initial value:
2  '--no-deps', '--no-dependencies',
3  dest='ignore_dependencies',
4  action='store_true',
5  default=False,
6  help="Don't install package dependencies.")
tuple pip.cmdoptions.no_index
Initial value:
2  '--no-index',
3  dest='no_index',
4  action='store_true',
5  default=False,
6  help='Ignore package index (only looking at --find-links URLs instead).')
tuple pip.cmdoptions.no_input
Initial value:
2  # Don't ask for input
3  '--no-input',
4  dest='no_input',
5  action='store_true',
6  default=False,
7  help=SUPPRESS_HELP)
tuple pip.cmdoptions.no_use_wheel
Initial value:
2  '--no-use-wheel',
3  dest='use_wheel',
4  action='store_false',
5  default=True,
6  help=('Do not Find and prefer wheel archives when searching indexes and '
7  'find-links locations.'),
8 )
tuple pip.cmdoptions.process_dependency_links
Initial value:
2  "--process-dependency-links",
3  dest="process_dependency_links",
4  action="store_true",
5  default=False,
6  help="Enable the processing of dependency links.",
7 )
tuple pip.cmdoptions.proxy
Initial value:
2  '--proxy',
3  dest='proxy',
4  type='str',
5  default='',
6  help="Specify a proxy in the form [user:passwd@]proxy.server:port.")
tuple pip.cmdoptions.quiet
Initial value:
2  '-q', '--quiet',
3  dest='quiet',
4  action='count',
5  default=0,
6  help='Give less output.')
tuple pip.cmdoptions.require_virtualenv
Initial value:
2  # Run only if inside a virtualenv, bail if not.
3  '--require-virtualenv', '--require-venv',
4  dest='require_venv',
5  action='store_true',
6  default=False,
7  help=SUPPRESS_HELP)
tuple pip.cmdoptions.requirements
Initial value:
2  '-r', '--requirement',
3  dest='requirements',
4  action='append',
5  default=[],
6  metavar='file',
7  help='Install from the given requirements file. '
8  'This option can be used multiple times.')
tuple pip.cmdoptions.skip_requirements_regex
Initial value:
2  # A regex to be used to skip requirements
3  '--skip-requirements-regex',
4  dest='skip_requirements_regex',
5  type='str',
6  default='',
7  help=SUPPRESS_HELP)
tuple pip.cmdoptions.timeout
Initial value:
2  '--timeout', '--default-timeout',
3  metavar='sec',
4  dest='timeout',
5  type='float',
6  default=15,
7  help='Set the socket timeout (default %default seconds).')
tuple pip.cmdoptions.use_mirrors
Initial value:
2  '-M', '--use-mirrors',
3  dest='use_mirrors',
4  action='store_true',
5  default=False,
6  help=SUPPRESS_HELP)
tuple pip.cmdoptions.use_wheel
Initial value:
2  '--use-wheel',
3  dest='use_wheel',
4  action='store_true',
5  help=SUPPRESS_HELP,
6 )
tuple pip.cmdoptions.verbose
Initial value:
2  '-v', '--verbose',
3  dest='verbose',
4  action='count',
5  default=0,
6  help='Give more output. Option is additive, and can be used up to 3 times.')
tuple pip.cmdoptions.version
Initial value:
2  '-V', '--version',
3  dest='version',
4  action='store_true',
5  help='Show version and exit.')

Copyright 2014 Google Inc. All rights reserved.