On Thu, Dec 6, 2012 at 6:33 AM, Donald Stufft <donald.stufft@gmail.com> wrote:
On Thursday, December 6, 2012 at 6:28 AM, Vinay Sajip wrote:Donald Stufft <donald.stufft <at> gmail.com> writes:Never mind the "Obsoletes" information - even the more useful "Requires-Dist"information is not exposed via PyPI, even though it appears to be stored in thedatabase. (Or if it is, please point me to where - I must have missed it.)Requires-Dist doesn't exist for more than a handful of packages. But PyPI exposesit via the XMLRPC API, possibly the JSON api as well.Even if this were to be made available, it's presumably obtained from PKG-INFO.As I understand, this data is not considered reliable - for example, pip runsegg_info on downloaded packages to get updated information when determiningdependencies to be downloaded. If the Requires-Dist info in PKG-INFO can't berelied on, surely less critical information such as Obsoletes can't be relied on,either?pip runs egg_info because setuptools does not write out to PKG-INFO whatthe dependencies are (it does write it out to a different text file though). But IIRCthat text file is not guaranteed to exist in the distribution. There's also thehistory where pip was trying to preserve as much backwards compat witheasy_install as it could, and if you used the file that egg_info writes outthen you'll only get the requirements for the system that the distribution waspackaged on. Any if statements that affect the dependencies won't bein effect.
Requires-Dist: pywin32 (>1.0); sys.platform == 'win32'