Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package index should list dependencies and dependents #54

Open
hickford opened this issue Jul 31, 2014 · 6 comments
Open

Package index should list dependencies and dependents #54

hickford opened this issue Jul 31, 2014 · 6 comments

Comments

@hickford
Copy link
Contributor

When reading about a package, it's useful to see a list of its dependencies. This is an important description of the package, and indispensably helpful for discovering related software (particularly if dependents are listed too). Sadly PyPI doesn't show any of this information, eg. https://pypi.python.org/pypi/Flask/

For comparison, RubyGems lists dependencies, eg. https://rubygems.org/gems/rails

Runtime Dependencies
*actionmailer = 4.1.4
*actionpack = 4.1.4

While Npm lists both dependencies and dependents, eg. https://www.npmjs.org/package/trumpet

Dependencies (6) html-select, html-tokenize, through2, duplexer2, inherits, readable-stream
Dependents (35) blunt-weave, papermonk-downloader-plosone, code-music-studio, harmon, omlet, script-injector, html-prefixer, compoxure, recaster, tabby, testling-server, hammerdown, cortex-html-sauce, express-webapp-host, hyperstream, daisy-streamify, svgify, gulp-prefix, hyperglue, gparser, and 15 more

@ncoghlan
Copy link
Member

ncoghlan commented Aug 1, 2014

PyPI doesn't currently expose this information because it hasn't actually
got a clue what the dependencies are.

Changing that is blocked by having declarative dependency metadata or a
build farm available. Allowing publication of proper dependency info is
indeed one of the key goals for metadata 2.0.

@dstufft
Copy link
Member

dstufft commented Aug 1, 2014

Techincally PyPI does support it and does display it, just very few packages are uploaded in a way that tells PyPI what it's dependencies are. See: https://pypi.python.org/pypi/twine

@ncoghlan
Copy link
Member

ncoghlan commented Aug 1, 2014

Ah, true, I always forget about that part of metadata 1.2. Perhaps Jason
would accept a patch to add at least that much metadata 1.2 support to
setuptools?

@dstufft
Copy link
Member

dstufft commented Aug 1, 2014

The problem with adding it to setuptools is it won't work correctly in the fairly common case where someone conditonally adds something to install_requires. Twine does it for wheels because it has conditional dependency support.

@brainwane
Copy link
Contributor

Thanks, @hickford.

If I understand correctly, this is tracked in pypi/warehouse#789.

@brainwane
Copy link
Contributor

Based on pypi/warehouse#474 , in order to make dependency tracking work for future releases, we'd need to

And some of this could be via public service announcement-type campaigns, and some of it could be through policy enforced at the PyPI level (e.g., on such-and-such a date, we will stop accepting releases whose metadata versions are under 2.1).

Another option is to depend more on Libraries.io, which has and is improving its PyPI dependency tracking -- see librariesio/libraries.io#1916 and librariesio/bibliothecary#415 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants