mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Merge pull request #835 from techalchemy/bugfix/git-ssh-vcs-url
Bugfix/git ssh vcs url
This commit is contained in:
+3
-2
@@ -60,15 +60,16 @@ class Project(object):
|
||||
if hasattr(v, 'keys'):
|
||||
# When a vcs url is gven without editable it only appears as a key
|
||||
if is_vcs(v) or is_vcs(k):
|
||||
# Non-editable VCS entries can't be resolved by piptools
|
||||
if 'editable' not in v:
|
||||
continue
|
||||
else:
|
||||
ps.update({k: v})
|
||||
else:
|
||||
if not is_file(v) and not is_file(k) and not is_vcs(v) and not is_vcs(k):
|
||||
if not is_file(v) and not is_file(k):
|
||||
ps.update({k: v})
|
||||
else:
|
||||
if not is_vcs(k) and not is_file(k):
|
||||
if not is_vcs(k) and not is_file(k) and not is_vcs(v):
|
||||
ps.update({k: v})
|
||||
return ps
|
||||
|
||||
|
||||
+9
-2
@@ -496,6 +496,7 @@ def convert_deps_from_pip(dep):
|
||||
req = [r for r in requirements.parse(dep)][0]
|
||||
extras = {'extras': req.extras}
|
||||
|
||||
|
||||
# File installs.
|
||||
if (req.uri or (os.path.exists(req.path) if req.path else False) or
|
||||
os.path.exists(req.name)) and not req.vcs:
|
||||
@@ -517,8 +518,8 @@ def convert_deps_from_pip(dep):
|
||||
if req.editable:
|
||||
dependency[req.name].update({'editable': True})
|
||||
|
||||
# VCS Installs.
|
||||
if req.vcs:
|
||||
# VCS Installs. Extra check for unparsed git over SSH
|
||||
if req.vcs or is_vcs(req.path):
|
||||
if req.name is None:
|
||||
raise ValueError('pipenv requires an #egg fragment for version controlled '
|
||||
'dependencies. Please install remote dependency '
|
||||
@@ -528,6 +529,12 @@ def convert_deps_from_pip(dep):
|
||||
if req.extras:
|
||||
dependency[req.name] = extras
|
||||
|
||||
# Set up this requirement as a proper VCS requirement if it was not
|
||||
if not req.vcs and req.path.startswith(VCS_LIST):
|
||||
req.vcs = [vcs for vcs in VCS_LIST if req.path.startswith(vcs)][0]
|
||||
req.uri = '{0}'.format(req.path)
|
||||
req.path = None
|
||||
|
||||
# Crop off the git+, etc part.
|
||||
dependency.setdefault(req.name, {}).update({req.vcs: req.uri[len(req.vcs) + 1:]})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user