Skip to content

Commit 3bf0c5c

Browse files
committed
add support for pip install https://<github-url>.git
1 parent c670678 commit 3bf0c5c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pip/commands/install.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ def _build_package_finder(self, options, index_urls):
183183
mirrors=options.mirrors)
184184

185185
def run(self, options, args):
186+
fix_git_urls(args)
186187
if options.download_dir:
187188
options.no_install = True
188189
options.ignore_installed = True
@@ -287,3 +288,12 @@ def run(self, options, args):
287288

288289

289290
InstallCommand()
291+
292+
# prepend git+ to invalid git urls
293+
def fix_git_urls(urls):
294+
for i in range(len(urls)):
295+
url = urls[i]
296+
if url.startswith('git+'):
297+
continue
298+
if url.endswith('.git'):
299+
urls[i] = 'git+' + urls[i]

0 commit comments

Comments
 (0)