From eb2e798ab01a46a5336067b60db23cfb3307b95f Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Fri, 22 Sep 2017 13:26:07 -0400 Subject: [PATCH] --envs Signed-off-by: Kenneth Reitz --- HISTORY.txt | 5 +++++ pipenv/__version__.py | 2 +- pipenv/cli.py | 15 ++++++++++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/HISTORY.txt b/HISTORY.txt index 87960808..4652d612 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -1,3 +1,8 @@ +7.5.0: + - Deprecate shell -c mode. + - Make a new shell --fancy mode (old default mode). + - Introduce PIPENV_SHELL_FANCY. + - Introduce `pipenv --envs``. 7.4.9: - Improvements to PIPENV_DEFAULT_PYTHON_VERSION. - Improvements to auto-suggestions. diff --git a/pipenv/__version__.py b/pipenv/__version__.py index 88f37e6b..0675d82e 100644 --- a/pipenv/__version__.py +++ b/pipenv/__version__.py @@ -3,4 +3,4 @@ # //___/ / / / //___/ / // // / / || / / # // / / // ((____ // / / ||/ / -__version__ = '7.4.9' +__version__ = '7.5.0' diff --git a/pipenv/cli.py b/pipenv/cli.py index 9ba2bdff..9ef4440f 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -1419,6 +1419,7 @@ def kr_easter_egg(package_name): @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('--envs', is_flag=True, default=False, help="Output Environment Variable Options.") @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.") @@ -1431,7 +1432,7 @@ def kr_easter_egg(package_name): def cli( ctx, where=False, venv=False, rm=False, bare=False, three=False, python=False, help=False, update=False, jumbotron=False, py=False, - site_packages=False + site_packages=False, envs=False ): if jumbotron: @@ -1450,6 +1451,18 @@ def cli( sys.exit() + if envs: + import environments + click.echo('The following environment variables can be set, to do various things:\n') + for key in environments.__dict__: + if key.startswith('PIPENV'): + click.echo(' - {0}'.format(crayons.white(key, bold=True))) + + click.echo('\nYou can learn more at:\n {0}'.format( + crayons.green('http://docs.pipenv.org/en/latest/advanced.html#configuration-with-environment-variables') + )) + sys.exit(0) + if PIPENV_USE_SYSTEM: # Only warn if pipenv isn't already active. if 'PIPENV_ACTIVE' not in os.environ: