[Distutils] Getting dependecies of package from PyPiJSON

Jeremy Stanley fungi at yuggoth.org
Thu Jul 20 09:22:01 EDT 2017


On 2017-07-20 14:55:53 +0200 (+0200), Krzysiek Płachno wrote:
[...]
> To make downloaded package working it's needed to install also
> dependencies. Is it possible to get dependencies information
> directly from PyPiJSON API? (e.g. by adding some request parameter
> or header in GET request)
> 
> 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.

PEP 518 aims to solve this eventually:

    https://www.python.org/dev/peps/pep-0518/

-- 
Jeremy Stanley


More information about the Distutils-SIG mailing list