Skip to content

Commit

Permalink
Merge pull request #4797 from ELHoussineT/patch-1
Browse files Browse the repository at this point in the history
Use PIPENV_SKIP_LOCK environment variable
  • Loading branch information
oz123 authored Feb 20, 2022
2 parents b092dd6 + 1741829 commit 8753cee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/4797.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use environment variable `PIPENV_SKIP_LOCK` to control the behaviour of lock skipping.
4 changes: 3 additions & 1 deletion pipenv/environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,15 @@ def initialize(self):
if interactive.
"""

self.PIPENV_SKIP_LOCK = False
self.PIPENV_SKIP_LOCK = bool(os.environ.get("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.
Usage: `export PIPENV_SKIP_LOCK=true` OR `export PIPENV_SKIP_LOCK=1` to skip automatic locking
NOTE: This only affects the ``install`` and ``uninstall`` commands.
"""
Expand Down

0 comments on commit 8753cee

Please sign in to comment.