On Mon, Nov 12, 2012 at 3:39 PM, PJ Eby <pje@telecommunity.com> wrote:
On Sat, Nov 10, 2012 at 6:51 AM, Vinay Sajip <vinay_sajip@yahoo.co.uk> wrote:Carl Meyer <carl <at> oddbird.net> writes:Thanks for the pointers.
> already satisfied. In pip this happens here:
> https://github.com/pypa/pip/blob/develop/pip/req.py#L1091
>
> More generally, I wouldn't really recommend pip's dependency resolution
> logic as a model for new Python code in this area. There are some not
> uncommon cases that it handles poorly; see
> https://github.com/pypa/pip/issues/174 and
> http://bugs.python.org/issue8927. (To be fair to pip, these cases aren't
> trivial when you have to download and unpack an sdist before you can
AFAICT, the proposed metadata PEP changes don't offer the same requirement
> find out anything about its dependencies, but I'd hope that with the new
> metadata PEPs Python packaging code could get a bit smarter in this area.)
granularity as setuptools / distribute (for example, 'Requires-Dist' as against
'install_requires', 'setup_requires', 'test_requires').
Anyway, I'll take a look at the issue you mentioned and see how the dependency
code in distlib stacks up. Currently, it keeps the requirements distinct for
'install', 'setup' and 'test'. The distinctions seem reasonable in theory,
though I'm not sure how useful they are in practice.
Test dependencies allow you to depend on a test framework (e.g. nose) without requiring it to be installed at runtime. Setup dependencies let you depend on tools like Pyrex or Cython in order to compile a binary package, without requiring them to be available at runtime.