From 310db99ad13e5f4555d2808c38b9ecd28a2a78ec Mon Sep 17 00:00:00 2001 From: ELHoussineT Date: Sun, 26 Sep 2021 22:30:54 +0200 Subject: [PATCH 1/3] Use PIPENV_SKIP_LOCK environment variable This is useful to large project as it enables the environment variable `PIPENV_SKIP_LOCK` to control the locking behavior. Default behavior is not changed, still False. --- pipenv/environments.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pipenv/environments.py b/pipenv/environments.py index 1471e450..0bd27f36 100644 --- a/pipenv/environments.py +++ b/pipenv/environments.py @@ -315,13 +315,15 @@ class Setting: 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. """ From 48cef74b18eb622ed632773c81769336404685ff Mon Sep 17 00:00:00 2001 From: ELHoussineT Date: Sun, 26 Sep 2021 22:56:15 +0200 Subject: [PATCH 2/3] add quotes --- pipenv/environments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipenv/environments.py b/pipenv/environments.py index 0bd27f36..bc3e73a5 100644 --- a/pipenv/environments.py +++ b/pipenv/environments.py @@ -323,7 +323,7 @@ class Setting: 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 + 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. """ From 174182955910657d277c542b0f4c2cb22f76a703 Mon Sep 17 00:00:00 2001 From: ELHoussineT Date: Sun, 13 Feb 2022 21:03:28 +0100 Subject: [PATCH 3/3] add news fragment for PR 4797 --- news/4797.feature.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/4797.feature.rst diff --git a/news/4797.feature.rst b/news/4797.feature.rst new file mode 100644 index 00000000..e2d7b3d1 --- /dev/null +++ b/news/4797.feature.rst @@ -0,0 +1 @@ +Use environment variable `PIPENV_SKIP_LOCK` to control the behaviour of lock skipping. \ No newline at end of file