Commits

Anonymous committed 751f6af

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

Comments (0)

Files changed (2)

 * 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.
+
 0.2.1
 -----
 
         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], req.name.lower()))
         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)