On Fri, Jul 21, 2017 at 11:39:01AM +0200, Krzysiek Płachno wrote: > 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?
I've had some luck parsing *.egg-info/requires.txt files in sdists. This is not 100% reliable (a setup.py may dynamically-compute the install_requires list during install time depending on sys.version_info or other factors), but it was good enough for my purposes. https://github.com/mgedmin/ztk-py3-status/blob/master/get_deps.py Regards, Marius Gedminas -- Hi. I'm the "I love you" .signature virus. You have been infected. Please panic immediately.
signature.asc
Description: PGP signature
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig