Commits

Ian Bicking committed c0472c3

Add -i support to requirements files

Comments (0)

Files changed (2)

 
 * Fix some filename issues on Windows.
 
+* Allow the ``-i`` and ``--extra-index-url`` options in requirements
+  files.
+
 0.3.1
 -----
 
             ## 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'):