Skip to content

Commit

Permalink
install vcs's to venv directory
Browse files Browse the repository at this point in the history
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
  • Loading branch information
kennethreitz committed Sep 23, 2017
1 parent 004175c commit e20a58d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pipenv/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,9 @@ def pip_install(
# Install dependencies when a package is a VCS dependency.
if [x for x in requirements.parse(package_name.split('--hash')[0])][0].vcs:
no_deps = False
src = '--src {0}'.format(project.virtualenv_src_location)
else:
src = ''

# Try installing for each source in project.sources.
if index:
Expand Down Expand Up @@ -1264,12 +1267,13 @@ def pip_install(
if os.name != 'nt':
quoted_pip = shellquote(quoted_pip)

pip_command = '{0} install {4} {3} {1} -i {2} --exists-action w'.format(
pip_command = '{0} install {4} {5} {3} {1} -i {2} --exists-action w'.format(
quoted_pip,
install_reqs,
source['url'],
no_deps,
pre
pre,
src
)

if verbose:
Expand Down
6 changes: 6 additions & 0 deletions pipenv/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ def virtualenv_location(self):
self._virtualenv_location = loc
return loc

@property
def virtualenv_src_location(self):
loc = os.sep.join([self.virtualenv_location, 'src'])
mkdir_p(loc)
return loc

@property
def download_location(self):
if self._download_location is None:
Expand Down

0 comments on commit e20a58d

Please sign in to comment.