Commits

Ian Bicking  committed 593d6b7 Merge
  • Participants
  • Parent commits a0858e9, c0472c3

Comments (0)

Files changed (3)

File docs/index.txt

 pip
 ===
 
+pip installs Python packages.  It is a replacement for
+``easy_install``.  Documentation follows; to download `visit the PyPI
+entry <http://pypi.python.org/pypi/pip>`_ (or the `repository
+<http://bitbucket.org/ianb/pip/>`_).
+
 .. toctree::
 
    news

File docs/news.txt

 
 * Fix some filename issues on Windows.
 
+* Allow the ``-i`` and ``--extra-index-url`` options in requirements
+  files.
+
 0.3.1
 -----
 
         find_links = options.find_links or []
         ## FIXME: Obviously this should be settable:
         find_tags = False
+        skip_match = None
+        if os.environ.get('PIP_SKIP_REQUIREMENTS_REGEX'):
+            skip_match = re.compile(os.environ['PIP_SKIP_REQUIREMENTS_REGEX'])
 
         if filename == '-':
             logger.move_stdout_to_stderr()
                 if not line.strip() or line.strip().startswith('#'):
                     f.write(line)
                     continue
+                if skip_match and skip_match.search(line):
+                    f.write(line)
+                    continue
                 elif line.startswith('-e') or line.startswith('--editable'):
                     if line.startswith('-e'):
                         line = line[2:].strip()
             ## 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'):