diff --git a/docs/advanced.rst b/docs/advanced.rst index ce385251..6a64fb60 100644 --- a/docs/advanced.rst +++ b/docs/advanced.rst @@ -84,12 +84,12 @@ variables. To activate them, simply create the variable in your shell and pipenv will detect it. - ``PIPENV_SHELL_COMPAT`` — Toggle from our default ``pipenv shell`` mode to classic. - (Suggested for use with pyenv) + (Suggested for use with pyenv). - - ``PIPENV_VENV_IN_PROJECT`` — Toggle for detecting a .venv in your directory and using - the local virtual environment over the default, ``pew``. + - ``PIPENV_VENV_IN_PROJECT`` — Toggle for detecting a ``.venv`` in your project directory + and using it over the default environment manager, ``pew``. - - ``PIPENV_COLORBLIND`` — Disable terminal colors. + - ``PIPENV_COLORBLIND`` — Disable terminal colors, for some reason. - ``PIPENV_MAX_DEPTH`` — Set to an integer for the maximum number of directories to search for a Pipfile. diff --git a/pipenv/cli.py b/pipenv/cli.py index a6d243e3..50392a96 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -51,10 +51,6 @@ if PIPENV_COLORBLIND: # Disable warnings for Python 2.6. requests.packages.urllib3.disable_warnings(InsecureRequestWarning) -# Prevent invalid shebangs with Homebrew-installed Python: -# https://bugs.python.org/issue22490 -os.environ.pop('__PYVENV_LAUNCHER__', None) - project = Project() diff --git a/pipenv/environments.py b/pipenv/environments.py index b17a861f..6f89e225 100644 --- a/pipenv/environments.py +++ b/pipenv/environments.py @@ -1,5 +1,11 @@ import os + +# Prevent invalid shebangs with Homebrew-installed Python: +# https://bugs.python.org/issue22490 +os.environ.pop('__PYVENV_LAUNCHER__', None) + + # Shell compatibility mode, for mis-configured shells. PIPENV_SHELL_COMPAT = os.environ.get('PIPENV_SHELL_COMPAT')