@command(short_help='Generates Pipfile.lock.')
@option('--three/--two', is_flag=True, default=None, help='Use Python 3/2 when creating virtualenv.')
@option('--python', default=False, nargs=1, callback=validate_python_path, help='Specify which version of Python virtualenv should use.')
@option('--pypi-mirror', default=PIPENV_PYPI_MIRROR, nargs=1, callback=validate_pypi_mirror, help='Specify a PyPI mirror.')
@option('--verbose', '-v', is_flag=True, default=False, help='Verbose mode.', callback=setup_verbose)
@option('--requirements', '-r', is_flag=True, default=False, help='Generate output compatible with requirements.txt.')
@option('--dev', '-d', is_flag=True, default=False, help='Generate output compatible with requirements.txt for the development dependencies.')
@option('--clear', is_flag=True, default=False, help='Clear the dependency cache.')
@option('--pre', is_flag=True, default=False, help=u'Allow pre–releases.')
@option('--keep-outdated', is_flag=True, default=False, help=u'Keep out–dated dependencies from being updated in Pipfile.lock.')
def lock(three=None, python=False, pypi_mirror=None, verbose=False, requirements=False, dev=False, clear=False, pre=False, keep_outdated=False):
    from .core import ensure_project, do_init, do_lock
    ensure_project(three=three, python=python)
    if requirements:
        do_init(dev=dev, requirements=requirements, pypi_mirror=pypi_mirror)
    do_lock(verbose=verbose, clear=clear, pre=pre, keep_outdated=keep_outdated, pypi_mirror=pypi_mirror)
@command(short_help='Generates Pipfile.lock.')
@option('--three/--two', is_flag=True, default=None, help='Use Python 3/2 when creating virtualenv.')
@option('--python', default=False, nargs=1, callback=validate_python_path, help='Specify which version of Python virtualenv should use.')
@option('--pypi-mirror', default=PIPENV_PYPI_MIRROR, nargs=1, callback=validate_pypi_mirror, help='Specify a PyPI mirror.')
@option('--verbose', '-v', is_flag=True, default=False, help='Verbose mode.', callback=setup_verbose)
@option('--requirements', '-r', is_flag=True, default=False, help='Generate output compatible with requirements.txt.')
@option('--dev', '-d', is_flag=True, default=False, help='Generate output compatible with requirements.txt for the development dependencies.')
@option('--clear', is_flag=True, default=False, help='Clear the dependency cache.')
@option('--pre', is_flag=True, default=False, help=u'Allow pre–releases.')
@option('--keep-outdated', is_flag=True, default=False, help=u'Keep out–dated dependencies from being updated in Pipfile.lock.')
def lock(three=None, python=False, pypi_mirror=None, verbose=False, requirements=False, dev=False, clear=False, pre=False, keep_outdated=False):
    from .core import ensure_project, do_init, do_lock
    ensure_project(three=three, python=python)
    if requirements:
        do_init(dev=dev, requirements=requirements, pypi_mirror=pypi_mirror)
    do_lock(verbose=verbose, clear=clear, pre=pre, keep_outdated=keep_outdated, pypi_mirror=pypi_mirror)