pypi and dependencies

A

Andrea Crotti

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..
Any other possible solution?
 
A

Andrea Crotti

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.)

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.

Yes that's not so nice, many projects write clearly the dependencies in
the README file,
but that's annoying because it might get outdated.

And it's also sad that it's not automatically fetched from setuptools,
because it's just

python setup.py egg-info && cat package.egg-info/requirements.txt

to actually extract them.
Should I file a bug maybe or is completely not feasible?
 
D

Diez B. Roggisch

Andrea Crotti said:
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..
Any other possible solution?

I don't understand this - if you declare the dependencies of your
published package in the requires-section of the setup()-call,
easy_install (and I guess pip as well, no experience with it) will
automatically fetch these.

Is that what you wanted to know?

Diez
 
A

Andrea Crotti

I don't understand this - if you declare the dependencies of your
published package in the requires-section of the setup()-call,
easy_install (and I guess pip as well, no experience with it) will
automatically fetch these.

Is that what you wanted to know?

Diez

It would be nice to know the dependencies *before* you actually try to
install it ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,144
Latest member
KetoBaseReviews
Top