def get_default_parser()

in dh_virtualenv/cmdline.py [0:0]


def get_default_parser():
    usage = '%prog [options]'
    parser = DebhelperOptionParser(usage, version='%prog ' + version)
    parser.add_option('-p', '--package', action='append', metavar='PACKAGE',
                      help='Act on the package(s) named PACKAGE')
    parser.add_option('-N', '--no-package', action='append', metavar='PACKAGE',
                      help='Do not act on the specified package(s)')
    parser.add_option('-v', '--verbose', action='store_true',
                      default=False, help='Turn on verbose mode')
    parser.add_option('-s', '--setuptools', action='callback',
                      dest='setuptools',
                      callback=_set_setuptools,
                      default=False, help='Use Setuptools instead of Distribute')
    parser.add_option('--extra-index-url', action='append', metavar='URL',
                      help='Extra index URL(s) to pass to pip.',
                      default=[])
    parser.add_option('--preinstall', action='append', metavar='PACKAGE',
                      help=('Package(s) to install before processing '
                            'requirements.txt.'),
                      default=[])
    parser.add_option('--extras', action='append', metavar='NAME',
                      help=('Activate one or more extras of the main package.'),
                      default=[])
    parser.add_option('--pip-tool', default='pip', metavar='EXECUTABLE',
                      help="Executable that will be used to install "
                      "requirements after the preinstall stage. Usually "
                      "you'll install this program by using the --preinstall "
                      "argument. The replacement is expected to be found in "
                      "the virtualenv's bin/ directory.")
    parser.add_option('--upgrade-pip', action='store_true', default=False,
                      help='Upgrade pip to the latest available version')
    parser.add_option('--upgrade-pip-to', default='', metavar='VERSION',
                      help='Upgrade pip to a specific version')
    parser.add_option('--extra-pip-arg', action='append', metavar='ARG',
                      help='One or more extra args for the pip binary.'
                      'You can use this flag multiple times to pass in'
                      ' parameters to pip.', default=[])
    parser.add_option('--extra-virtualenv-arg', action='append', metavar='ARG',
                      help='One or more extra args for the virtualenv binary.'
                      'You can use this flag multiple times to pass in'
                      ' parameters to the virtualenv binary.', default=[])
    parser.add_option('--index-url', metavar='URL',
                      help='Base URL of the PyPI server',
                      action='callback',
                      type='string',
                      dest='index_url',
                      callback=_check_for_deprecated_options)
    parser.add_option('--python', metavar='EXECUTABLE',
                      help='The Python command to use')
    parser.add_option('--builtin-venv', action='callback',
                      dest='builtin_venv',
                      callback=_set_builtin_venv,
                      help='Use the built-in venv module. Only works on '
                      'Python 3.4 and later.')
    parser.add_option('-D', '--sourcedirectory', dest='sourcedirectory',
                      help='The source directory')
    parser.add_option('-n', '--noscripts', action='store_false', dest='autoscripts',
                      help="Do not modify postinst and similar scripts.",
                      default=True)
    parser.add_option('-S', '--use-system-packages', action='store_true',
                      dest='use_system_packages',
                      help="Set the --system-site-packages flag in virtualenv "
                           "creation, allowing you to use system packages.",
                      default=False)
    parser.add_option('--skip-install', action='store_true',
                      default=False,
                      dest='skip_install',
                      help="Skip running pip install within the source directory.")
    parser.add_option('--install-suffix', metavar='DIRNAME',
                      dest='install_suffix',
                      help="Override installation path suffix")
    parser.add_option('--requirements', metavar='FILEPATH',
                      dest='requirements_filename',
                      help='Specify the filename for requirements.txt',
                      default='requirements.txt')
    parser.add_option('--setuptools-test',
                      dest='setuptools_test',
                      default=False,
                      action='callback',
                      help='Run `setup.py test` when building the package',
                      callback=_check_for_deprecated_options)

    # Ignore user-specified option bundles
    parser.add_option('-O', help=SUPPRESS_HELP)
    parser.add_option('-a', '--arch', dest="arch",
                      help=("Act on architecture dependent packages that "
                            "should be built for the build architecture. "
                            "This option is ignored"),
                      action="store", type="string")

    parser.add_option('-i', '--indep', dest="indep",
                      help=("Act on all architecture independent packages. "
                            "This option is ignored"),
                      action="store_true")

    # Deprecated options
    parser.add_option('--pypi-url', metavar='URL',
                      help=('!!DEPRECATED, use --index-url instead!! '
                            'Base URL of the PyPI server'),
                      action='callback',
                      dest='index_url',
                      type='string',
                      callback=_check_for_deprecated_options)
    parser.add_option('--no-test',
                      help="!!DEPRECATED, this command has no effect. "
                      "See --setuptools-test!! "
                      "Don't run tests for the package. Useful "
                      "for example when you have packaged with distutils.",
                      action='callback',
                      callback=_check_for_deprecated_options)
    return parser