diff --git a/pipenv/cli/options.py b/pipenv/cli/options.py index 99fc5344..940bbf77 100644 --- a/pipenv/cli/options.py +++ b/pipenv/cli/options.py @@ -127,6 +127,7 @@ def skip_lock_option(f): return value return option("--skip-lock", is_flag=True, default=False, expose_value=False, help=u"Ignore locking mechanisms when installing—use the Pipfile, instead.", + envvar="PIPENV_SKIP_LOCK", callback=callback, type=click_booltype)(f) diff --git a/pipenv/environments.py b/pipenv/environments.py index 4bfd937d..45d5f720 100644 --- a/pipenv/environments.py +++ b/pipenv/environments.py @@ -197,6 +197,16 @@ Default is to prompt the user for an answer if the current command line session if interactive. """ +PIPENV_SKIP_LOCK = False +"""If set, Pipenv won't lock dependencies automatically. + +This might be desirable if a project has large number of dependencies, +because locking is an inherently slow operation. + +Default is to lock dependencies and update ``Pipfile.lock`` on each run. + +NOTE: This only affects the ``install`` and ``uninstall`` commands. +""" # Internal, support running in a different Python from sys.executable. PIPENV_PYTHON = os.environ.get("PIPENV_PYTHON")