Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2018-02-24 09:52:05 -05:00
parent e760efc130
commit acd3fc736d
3 changed files with 16 additions and 5 deletions
+1
View File
@@ -3,6 +3,7 @@
creating a Pipfile.lock.
- Introducing `pipenv lock --keep-outdated`, which can also be passed to
`install` and `uninstall`.
- New Pipfile configuration option for [pipenv] section: `keep_outdated`.
10.0.1:
- Add extra indexes from pip config files in Pipfile generation.
- Fix bug with `pipenv clean`.
+1 -1
View File
@@ -45,7 +45,7 @@ def setup_verbose(ctx, param, value):
def cli(
ctx, where=False, venv=False, rm=False, bare=False, three=False,
python=False, help=False, update=False, py=False,
site_packages=False, envs=False, man=False, completion=False
site_packages=False, envs=False, man=False, completion=False, keep_outdated=False
):
from . import core
+14 -4
View File
@@ -1622,9 +1622,11 @@ def warn_in_virtualenv():
)
def ensure_lockfile():
def ensure_lockfile(keep_outdated=False):
"""Ensures that the lockfile is uptodate."""
pre = project.settings.get('allow_prereleases')
if not keep_outdated:
keep_outdated = project.settings.get('keep_outdated')
# Write out the lockfile if it doesn't exist, but not if the Pipfile is being ignored
if project.lockfile_exists:
@@ -1652,9 +1654,9 @@ def ensure_lockfile():
err=True
)
do_lock(pre=pre)
do_lock(pre=pre, keep_outdated=keep_outdated)
else:
do_lock(pre=pre)
do_lock(pre=pre, keep_outdated=keep_outdated)
def do_py(system=False):
@@ -1685,6 +1687,9 @@ def do_install(
if not pre:
pre = project.settings.get('allow_prereleases')
if not keep_outdated:
keep_outdated = project.settings.get('keep_outdated')
remote = requirements and is_valid_url(requirements)
# Warn and exit if --system is used without a pipfile.
@@ -1772,6 +1777,8 @@ def do_install(
# Update project settings with pre preference.
if pre:
project.update_settings({'allow_prereleases': pre})
if keep_outdated:
project.update_settings({'keep_outdated': keep_outdated})
do_init(dev=dev, allow_global=system, ignore_pipfile=ignore_pipfile, system=system, skip_lock=skip_lock, verbose=verbose, concurrent=concurrent, deploy=deploy, pre=pre)
@@ -1837,6 +1844,8 @@ def do_install(
# Update project settings with pre preference.
if pre:
project.update_settings({'allow_prereleases': pre})
if keep_outdated:
project.update_settings({'keep_outdated': keep_outdated})
if lock and not skip_lock:
do_init(dev=dev, allow_global=system, concurrent=concurrent, verbose=verbose, keep_outdated=keep_outdated)
@@ -1856,7 +1865,8 @@ def do_uninstall(
ensure_project(three=three, python=python)
# Load the --pre settings from the Pipfile.
pre = project.settings.get('pre')
pre = project.settings.get('allow_prereleases')
package_names = (package_name,) + more_packages
pipfile_remove = True