create a project too

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2018-01-10 09:38:51 -05:00
parent 6ccd3610b2
commit 27230d2569
+9 -3
View File
@@ -47,12 +47,18 @@ class Requirement(object):
class PipenvProject(object):
"""A Pipenv project."""
def __init__(self, home, pipfile='Pipfile'):
def __init__(self, home, pipfile='Pipfile', create=False):
self.home = home
self.pipfile = pipfile
# Assert that the Pipfile exists.
self.assert_has_pipfile()
if not create:
# Assert that the Pipfile exists.
self.assert_has_pipfile()
else:
# Cheat a project-creation by installing, then uninstalling
# the Requests library. :)
self.install('requests')
self.uninstlal('requests')
@property
def _pipfile_path(self):