On 2017-07-20 11:11:38 -0300 (-0300), Leonardo Rochael Almeida wrote:
[...]
> 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.

Agreed, I elided those details not knowing the extent of familiarity
of the question's author with nuances of Python packaging, but
you're right I should take more care to not overload the term
"installation" without clarifying the circumstances.

As many projects on PyPI lack wheels (and most non-pure-Python
projects lack wheels for at least some platforms), sdists are for
better or worse the most prevalent and portable "packaging" format
on PyPI. 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. It
might be sufficient if sticking with some popular subset of packages
though.
-- 
Jeremy Stanley
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to