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

Vinay Sajip vinay_sajip at yahoo.co.uk
Thu Sep 12 18:24:01 CEST 2013


Paul Moore <p.f.moore <at> gmail.com> writes:

> I'd say yes, raise an issue on the pip tracker. At a minimum, it will
> ensure that the issue is discussed and the conclusion recorded.

Okay, will do.
 
> Personally, I'd say that zipping up pip should work. Whether it's
> valid to require people to include dist-info directories in zips, as
> Daniel says, I'm not sure - maybe it should be a requirement, but if
> so, then the python docs on how to zip up files to make executable
> zips should document this (potential) requirement.

I don't believe it should be a requirement - wherever possible, Python code
shouldn't need to be installed into a site-packages in order to work.

> Without seeing the surrounding code, I can't say whether the use of
> pkg_resources here is valid.

Since in each case here it's just checking versions, I would say that it's
not really necessary. These are the only two cases in pip where it's
searching using string literals 'setuptools' and 'pip' - as these are
actually a dependency and pip itself, it shouldn't really need to look for
an installed distribution, since the fact that it's running means that
(under normal circumstances) it's using imported code rather than installed
code (which is what leads to the errors, of course).

Regards,

Vinay Sajip



More information about the Distutils-SIG mailing list