ianb  committed 751f6af

[svn r21848] Fix -f (search those for links) and detect zip files better

  • Participants
  • Parent commits 69bea95

Comments (0)

Files changed (2)

File docs/news.txt

 * Allow ``pip -E`` to work with a virtualenv that uses a different
   version of Python than the parent environment.
+* Search the links passed in with ``-f`` for packages.
+* Detect zip files, even when the file doesn't have a ``.zip``
+  extension and it is served with the wrong Content-Type.
         for location in locations:
             logger.debug('* %s' % location)
         found_versions = []
+        found_versions.extend(
+            self._package_versions(
+                [Link(url, '-f') for url in self.find_links],
         for page in self._get_pages(locations, req):
             logger.debug('Analyzing links from page %s' % page.url)
             logger.indent += 2
     def unpack_file(self, filename, location, content_type, link):
         if (content_type == 'application/zip'
             or filename.endswith('.zip')
-            or filename.endswith('.pybundle')):
+            or filename.endswith('.pybundle')
+            or zipfile.is_zipfile(filename)):
             self.unzip_file(filename, location, flatten=not filename.endswith('.pybundle'))
         elif (content_type == 'application/x-gzip'
               or tarfile.is_tarfile(filename)