mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
+9
-1
@@ -1321,6 +1321,7 @@ def kr_easter_egg(package_name):
|
||||
@click.option('--update', is_flag=True, default=False, help="Update Pipenv & pip to latest.")
|
||||
@click.option('--where', is_flag=True, default=False, help="Output project home information.")
|
||||
@click.option('--venv', is_flag=True, default=False, help="Output virtualenv information.")
|
||||
@click.option('--py', is_flag=True, default=False, help="Output Python interpreter information.")
|
||||
@click.option('--rm', is_flag=True, default=False, help="Remove the virtualenv.")
|
||||
@click.option('--bare', is_flag=True, default=False, help="Minimal output.")
|
||||
@click.option('--three/--two', is_flag=True, default=None, help="Use Python 3/2 when creating virtualenv.")
|
||||
@@ -1331,7 +1332,7 @@ def kr_easter_egg(package_name):
|
||||
@click.pass_context
|
||||
def cli(
|
||||
ctx, where=False, venv=False, rm=False, bare=False, three=False,
|
||||
python=False, help=False, update=False, jumbotron=False
|
||||
python=False, help=False, update=False, jumbotron=False, py=False
|
||||
):
|
||||
|
||||
if jumbotron:
|
||||
@@ -1367,6 +1368,10 @@ def cli(
|
||||
do_where(bare=bare)
|
||||
sys.exit(0)
|
||||
|
||||
elif py:
|
||||
do_py()
|
||||
sys.exit()
|
||||
|
||||
# --venv was passed...
|
||||
elif venv:
|
||||
# There is no virtualenv yet.
|
||||
@@ -1413,6 +1418,9 @@ def cli(
|
||||
click.echo(format_help(ctx.get_help()))
|
||||
|
||||
|
||||
def do_py(system=False):
|
||||
click.echo(which('python', allow_global=system))
|
||||
|
||||
@click.command(help="Installs provided packages and adds them to Pipfile, or (if none is given), installs all packages.", context_settings=dict(
|
||||
ignore_unknown_options=True,
|
||||
allow_extra_args=True
|
||||
|
||||
Reference in New Issue
Block a user