Merge pull request #394 from kennethreitz/three

default python 3
This commit is contained in:
2017-06-03 18:51:35 -04:00
committed by GitHub
2 changed files with 10 additions and 1 deletions
+7 -1
View File
@@ -24,7 +24,8 @@ from .utils import (convert_deps_from_pip, convert_deps_to_pip, is_required_vers
proper_case, pep423_name, split_vcs)
from .__version__ import __version__
from . import pep508checker, progress
from .environments import PIPENV_COLORBLIND, PIPENV_NOSPIN, PIPENV_SHELL_COMPAT, PIPENV_VENV_IN_PROJECT
from .environments import PIPENV_COLORBLIND, PIPENV_NOSPIN, PIPENV_SHELL_COMPAT
from .environments import PIPENV_DEFAULT_THREE, PIPENV_VENV_IN_PROJECT
# Backport required for earlier versions of Python.
if sys.version_info < (3, 3):
@@ -151,6 +152,11 @@ def ensure_virtualenv(three=None, python=None):
def ensure_project(three=None, python=None, validate=True):
"""Ensures both Pipfile and virtualenv exist for the project."""
# Support for default three mode.
if PIPENV_DEFAULT_THREE:
three = True
ensure_pipfile(validate=validate)
ensure_virtualenv(three=three, python=python)
+3
View File
@@ -22,6 +22,9 @@ PIPENV_NOSPIN = os.environ.get('PIPENV_NOSPIN')
# Note: +1 because of a temporary bug in Pipenv.
PIPENV_MAX_DEPTH = int(os.environ.get('PIPENV_MAX_DEPTH', '3')) + 1
# Tells Pipenv to use Python three by default.
PIPENV_DEFAULT_THREE = os.environ.get('PIPENV_DEFAULT_THREE')
# Use shell compatibility mode when using venv in project mode.
if PIPENV_VENV_IN_PROJECT:
PIPENV_SHELL_COMPAT = True