[Distutils] Getting dependecies of package from PyPiJSON
Leonardo Rochael Almeida
leorochael at gmail.com
Thu Jul 20 10:11:38 EDT 2017
Hi Jeremy,
On 20 July 2017 at 10:22, Jeremy Stanley <fungi at yuggoth.org> wrote:
> On 2017-07-20 14:55:53 +0200 (+0200), Krzysiek Płachno wrote:
> [...]
> >
> > Or is it possible to this data in any other way (apart from
> > downloading package)?
>
> Unfortunately, no, not with the current state of the Python package
> ecosystem. Packages are allowed to define their own dependencies
> dynamically and conditionally at the time of installation so there's
> no good way for PyPI to know what dependencies each package has.
>
> [...]
A small clarification: Packages can define their own dependencies
dynamically only at *build* time, not at *installation* time.
The difference is subtle (considering many packages (the ones with only
sdist on PyPI) are built at the same time they're installed), but important:
In practice it means that if you have a wheel (or an egg), you can
determine the dependencies without installing, just by looking at the
metadata inside the package.
Cheers,
Leo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20170720/d136bffd/attachment.html>
More information about the Distutils-SIG
mailing list