Guys! Thanks a lot for all your responses and willingness to help!

Yesterday I noticed this `requires_dist` in response for Requests package.
But actually it was the only one that had this field populated from many
packages that I asked API for. So this cannot be reliable way of getting
dependecies.

So if not using pip, the only way to get dependencies is from built
packages: .whl and .egg.
So in .egg it'd be: *EGG_INFO/requires.txt* and in .whl :
*<packageName-version>.dist-info/metadata.json*, right?

Thanks a lot!
Best,
Krzysztof



2017-07-21 3:56 GMT+02:00 Jeremy Stanley <fu...@yuggoth.org>:

> On 2017-07-20 21:09:28 -0400 (-0400), John Thorvald Wodder II wrote:
> > [Sending to the list this time]
> >
> > On 2017 Jul 20, at 12:41, Jeremy Stanley <fu...@yuggoth.org> wrote:
> > > So while it might be possible to add some sort of feature
> > > to inspect wheels at upload and then store the specific dependencies
> > > declared therein and report those back via an API method, I expect
> > > coverage across packages in general would be fairly low today.
> >
> > PyPI (both Legacy and Warehouse) actually does do this already;
> > see the `requires_dist` field in, e.g.,
> > <https://pypi.org/pypi/qypi/json>. However, this only seems to
> > work if the maintainer uploads the wheel before uploading the
> > sdist (unless the sdist is a .zip instead of a .tar.gz, then it
> > can be uploaded first?  I'm not sure).
>
> Indeed, I'd never noticed that. And the projects I work on upload
> wheels before sdists so seem to have everything from our
> install_requires reflected there (including extras and environment
> markers... even the versioned pages work). Very neat, and glad to
> learn it already exists.
>
> I wonder though how it deals with projects that build multiple
> wheels for different platforms with different install_requires. It
> looks like that's a top-level field in the info dict so can't
> reasonably be differentiated. Takes the first one uploaded I guess
> and ignores the subsequent ones?
>
> Anyway, this looks like it probably fulfils Krzysiek's need for
> XWiki. Thanks for pointing it out! I very well may try to leverage
> this for a few things myself.
> --
> Jeremy Stanley
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG@python.org
> https://mail.python.org/mailman/listinfo/distutils-sig
>
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to