mirror of https://github.com/pypa/pip
`pip wheel` needs --src option if it's going support --editable for vcs reqs
This commit is contained in:
parent
12034176a1
commit
52299a7fe7
|
@ -9,7 +9,7 @@ pass on state. To be consistent, all options will follow this design.
|
|||
"""
|
||||
import copy
|
||||
from optparse import OptionGroup, SUPPRESS_HELP, Option
|
||||
from pip.locations import build_prefix, default_log_file
|
||||
from pip.locations import build_prefix, default_log_file, src_prefix
|
||||
|
||||
|
||||
def make_option_group(group, parser):
|
||||
|
@ -296,6 +296,16 @@ editable = OptionMaker(
|
|||
'"develop mode") from a local project path or a VCS url.'),
|
||||
)
|
||||
|
||||
src = OptionMaker(
|
||||
'--src', '--source', '--source-dir', '--source-directory',
|
||||
dest='src_dir',
|
||||
metavar='dir',
|
||||
default=src_prefix,
|
||||
help='Directory to check out editable projects into. '
|
||||
'The default in a virtualenv is "<venv path>/src". '
|
||||
'The default for global installs is "<current dir>/src".'
|
||||
)
|
||||
|
||||
use_wheel = OptionMaker(
|
||||
'--use-wheel',
|
||||
dest='use_wheel',
|
||||
|
|
|
@ -4,7 +4,7 @@ import shutil
|
|||
|
||||
from pip.req import InstallRequirement, RequirementSet, parse_requirements
|
||||
from pip.log import logger
|
||||
from pip.locations import (src_prefix, virtualenv_no_global, distutils_scheme,
|
||||
from pip.locations import (virtualenv_no_global, distutils_scheme,
|
||||
build_prefix)
|
||||
from pip.basecommand import Command
|
||||
from pip.index import PackageFinder
|
||||
|
@ -64,15 +64,7 @@ class InstallCommand(Command):
|
|||
)
|
||||
|
||||
cmd_opts.add_option(cmdoptions.download_cache.make())
|
||||
|
||||
cmd_opts.add_option(
|
||||
'--src', '--source', '--source-dir', '--source-directory',
|
||||
dest='src_dir',
|
||||
metavar='dir',
|
||||
default=src_prefix,
|
||||
help='Directory to check out editable projects into. '
|
||||
'The default in a virtualenv is "<venv path>/src". '
|
||||
'The default for global installs is "<current dir>/src".')
|
||||
cmd_opts.add_option(cmdoptions.src.make())
|
||||
|
||||
cmd_opts.add_option(
|
||||
'-U', '--upgrade',
|
||||
|
|
|
@ -64,6 +64,7 @@ class WheelCommand(Command):
|
|||
cmd_opts.add_option(cmdoptions.editable.make())
|
||||
cmd_opts.add_option(cmdoptions.requirements.make())
|
||||
cmd_opts.add_option(cmdoptions.download_cache.make())
|
||||
cmd_opts.add_option(cmdoptions.src.make())
|
||||
cmd_opts.add_option(cmdoptions.no_deps.make())
|
||||
cmd_opts.add_option(cmdoptions.build_dir.make())
|
||||
|
||||
|
@ -159,7 +160,7 @@ class WheelCommand(Command):
|
|||
options.build_dir = os.path.abspath(options.build_dir)
|
||||
requirement_set = RequirementSet(
|
||||
build_dir=options.build_dir,
|
||||
src_dir=None,
|
||||
src_dir=options.src_dir,
|
||||
download_dir=None,
|
||||
download_cache=options.download_cache,
|
||||
ignore_dependencies=options.ignore_dependencies,
|
||||
|
|
Loading…
Reference in New Issue