[Distutils] pip does not work as expected from a zip

PJ Eby pje at telecommunity.com
Thu Sep 12 22:45:29 CEST 2013


On Thu, Sep 12, 2013 at 2:14 PM, Daniel Holth <dholth at gmail.com> wrote:
> I'm suggesting it might be a bug in pkg_resources, or it might be
> something pkg_resources can already do, if pip.zip is added to
> PYTHONPATH while executing setup.py in a subprocess.

pkg_resources can detect subdirectories in a zip that are named
"whatever-version.egg/", and treat them like egg files or directories.
 I don't recall whether it can detect .egg-info in .zip, though; I
don't think I specifically implemented that, so if it works, it's by
virtue of a good orthogonal design rather than any specific intent for
it to work.  ;-)

My guess, though, is that the "basket" support (i.e. zipped .egg
subdirectories) is the only way at the moment to bundle multiple
distributions in a .pyz or other archive.

(Note: I don't mean putting an .egg file in the .zip, just zipping up
an .egg directory and including it as a subdirectory inside the main
.zip/.pyz/whatever.)


More information about the Distutils-SIG mailing list