提交 da06a6e8 编写于 作者: I Ian Bicking

Add -i support to requirements files

上级 58278570
......@@ -19,6 +19,9 @@ hg tip
* Fix some filename issues on Windows.
* Allow the ``-i`` and ``--extra-index-url`` options in requirements
files.
0.3.1
-----
......
......@@ -3447,6 +3447,15 @@ def parse_requirements(filename, finder, comes_from=None):
## FIXME: it would be nice to keep track of the source of
## the find_links:
finder.find_links.append(line)
elif line.startswith('-i') or line.startswith('--index-url'):
if line.startswith('-i'):
line = line[2:].strip()
else:
line = line[len('--index-url'):].strip().lstrip('=')
finder.index_urls = [line]
elif line.startswith('--extra-index-url'):
line = line[len('--extra-index-url'):].strip().lstrip('=')
finder.index_urls.append(line)
else:
comes_from = '-r %s (line %s)' % (filename, line_number)
if line.startswith('-e') or line.startswith('--editable'):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册