pypi and dependencies

Ben Finney ben+python at benfinney.id.au
Tue Mar 20 07:18:39 EDT 2012


Andrea Crotti <andrea.crotti.0 at gmail.com> writes:

> When I publish something on Pypi, is there a way to make it fetch the list
> of dependencies needed by my project automatically?
>
> It would be nice to have it in the Pypi page, without having to look at the
> actual code..

Sadly, no. The metadata available for packages on PyPI does not include
information about the dependencies.

(I'd love to be wrong about that, but I'm pretty certain that for most,
if not all, packages that's the case.)

> Any other possible solution?

All the solutions I've seen involve fetching the full package in order
to unpack it and *then* parse it for dependencies.

This is very sub-optimal, and I believe people are working on it; but
fixing it will at least require adjustment to all existing packages that
don't have dependencies in their metadata.

-- 
 \       “Some people have a problem, and they think “I know, I'll use |
  `\     Perl!”. Now they have some number of problems but they're not |
_o__)     sure whether it's a string or an integer.” —Benno Rice, 2011 |
Ben Finney



More information about the Python-list mailing list