[pipenv] pre=True

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2017-09-25 16:50:12 -04:00
parent 968c182d06
commit 426b0f15f5
2 changed files with 14 additions and 0 deletions
+9
View File
@@ -1645,6 +1645,10 @@ def install(
# Ensure that virtualenv is available.
ensure_project(three=three, python=python, system=system, warn=True)
# Load the --pre settings from the Pipfile.
if not pre:
pre = project.settings.get('pre')
if requirements:
click.echo(crayons.normal(u'Requirements file provided! Importing into Pipfile…', bold=True), err=True)
import_requirements(r=requirements, dev=dev)
@@ -1863,6 +1867,11 @@ def lock(three=None, python=False, verbose=False, requirements=False, clear=Fals
# Ensure that virtualenv is available.
ensure_project(three=three, python=python)
# Load the --pre settings from the Pipfile.
if not pre:
pre = project.settings.get('pre')
if requirements:
do_init(dev=True, requirements=requirements)
+5
View File
@@ -239,6 +239,11 @@ class Project(object):
return pfile
@property
def settings(self):
"""A dictionary of the settings added to the Pipfile."""
return self.parsed_pipfile.get('pipenv', {})
@property
def _lockfile(self):
"""Pipfile.lock divided by PyPI and external dependencies."""