On Thu, Sep 12, 2013 at 12:24 PM, Vinay Sajip <vinay_sa...@yahoo.co.uk> wrote:
> 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

In wheel's case the idea was to have pip verify that the optional
dependency is new enough to work. The part inside pip could be changed
to try: import wheel; check(wheel.__version__). IIRC the pip process
itself does not directly use anything inside wheel and does not need
to "import wheel".

However "setup.py bdist_wheel ...", run by pip in a subprocess, will
not work unless setuptools can find wheel's plugin declaration. That
won't work unless wheel's *.dist-info/entry_points.txt on sys.path.

It is true that pip has a greater dependency on "knowing what's
installed" than most Python software and therefore needs the -info
directories that provide the installation database. Programs that are
not installers and do not use entry_points usually do fine with just
"try: import x".
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to