From 3daeb710e577bc02b27fc4328747f8b2ca94b310 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Wed, 1 Feb 2017 16:26:13 -0500 Subject: [PATCH] User-configuraable max-depth for Pipfile searching. --- HISTORY.txt | 3 +++ pipenv/__version__.py | 2 +- pipenv/project.py | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/HISTORY.txt b/HISTORY.txt index 9e7e1b2e..e2256d03 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -1,3 +1,6 @@ +3.3.2: + - User-configuraable max-depth for Pipfile searching. + - Bugfix. 3.3.1: - Bugfix for install. 3.3.0: diff --git a/pipenv/__version__.py b/pipenv/__version__.py index 4fe44b84..cc53d041 100644 --- a/pipenv/__version__.py +++ b/pipenv/__version__.py @@ -3,4 +3,4 @@ # //___/ / / / //___/ / // // / / || / / # // / / // ((____ // / / ||/ / -__version__ = '3.3.1' +__version__ = '3.3.2' diff --git a/pipenv/project.py b/pipenv/project.py index 512e4098..a025882f 100644 --- a/pipenv/project.py +++ b/pipenv/project.py @@ -11,6 +11,10 @@ from .utils import format_toml, mkdir_p from .utils import convert_deps_from_pip +# User-configuraable max-depth for Pipfile searching. +PIPENV_MAX_DEPTH = int(os.environ.get('PIPENV_MAX_DEPTH', '3')) + + class Project(object): """docstring for Project""" def __init__(self): @@ -64,7 +68,7 @@ class Project(object): @property def pipfile_location(self): try: - return pipfile.Pipfile.find() + return pipfile.Pipfile.find(max_depth=PIPENV_MAX_DEPTH) except RuntimeError: return None