mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Add PIPENV_NOSPIN option for cleaner build logs
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
unreleased:
|
||||
- Disable spinner by setting PIPENV_NOSPIN=1 environment variable.
|
||||
3.3.4:
|
||||
- Fix PIPENV_VENV_IN_PROJECT mode.
|
||||
- Fix PIPENV_SHELL_COMPAT mode.
|
||||
|
||||
@@ -91,6 +91,8 @@ will detect it.
|
||||
|
||||
- ``PIPENV_COLORBLIND`` — Disable terminal colors, for some reason.
|
||||
|
||||
- ``PIPENV_NOSPIN`` — Disable terminal spinner, for cleaner logs.
|
||||
|
||||
- ``PIPENV_MAX_DEPTH`` — Set to an integer for the maximum number of directories to
|
||||
search for a Pipfile.
|
||||
|
||||
|
||||
+8
-1
@@ -23,7 +23,7 @@ from .project import Project
|
||||
from .utils import convert_deps_from_pip, convert_deps_to_pip, is_required_version
|
||||
from .__version__ import __version__
|
||||
from . import pep508checker
|
||||
from .environments import PIPENV_COLORBLIND, PIPENV_SHELL_COMPAT, PIPENV_VENV_IN_PROJECT
|
||||
from .environments import PIPENV_COLORBLIND, PIPENV_NOSPIN, PIPENV_SHELL_COMPAT, PIPENV_VENV_IN_PROJECT
|
||||
|
||||
try:
|
||||
from HTMLParser import HTMLParser
|
||||
@@ -49,6 +49,13 @@ click_completion.init()
|
||||
if PIPENV_COLORBLIND:
|
||||
crayons.disable()
|
||||
|
||||
# Disable spinner, for cleaner build logs.
|
||||
if PIPENV_NOSPIN:
|
||||
import contextlib
|
||||
@contextlib.contextmanager
|
||||
def spinner():
|
||||
yield
|
||||
|
||||
# Disable warnings for Python 2.6.
|
||||
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@ PIPENV_VENV_IN_PROJECT = os.environ.get('PIPENV_VENV_IN_PROJECT')
|
||||
# No color mode, for unfun people.
|
||||
PIPENV_COLORBLIND = os.environ.get('PIPENV_COLORBLIND')
|
||||
|
||||
# Disable spinner for better test and deploy logs.
|
||||
PIPENV_NOSPIN = os.environ.get('PIPENV_NOSPIN')
|
||||
|
||||
# User-configuraable max-depth for Pipfile searching.
|
||||
# Note: +1 because of a bug in Pipenv.
|
||||
PIPENV_MAX_DEPTH = int(os.environ.get('PIPENV_MAX_DEPTH', '3')) + 1
|
||||
|
||||
Reference in New Issue
Block a user