Missing metadata from some sdists

Bug #1787744 reported by Tres Seaver
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pkginfo
Won't Fix
Undecided
Unassigned

Bug Description

Via e-mail, wim (wim.glenn@<elided>.com) reported:

---------------------------------- %< -------------------------------
I don't seem to be able to get metadata correctly for
sdist sometimes, is that expected or a bug?
Here is an example where pkginfo can not get the correct metadata from the latest requests (2.19.1) sdist, but it can get it from the bdist_wheel ok.

$ pip install --upgrade pkginfo
Collecting pkginfo
  Using cached
https://files.pythonhosted.org/packages/a3/fe/f32a48d48f40a7209be9825fba2566cab92364787cf37de2e08300dd6ce7/pkginfo-1.4.2-py2.py3-none-any.whl
Installing collected packages: pkginfo
Successfully installed pkginfo-1.4.2
$ pip download --no-deps requests
Collecting requests
  Using cached
https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl
  Saved ./requests-2.19.1-py2.py3-none-any.whl
Successfully downloaded requests
$ pip download --no-deps --no-binary :all: requests
Collecting requests
  Using cached
https://files.pythonhosted.org/packages/54/1f/782a5734931ddf2e1494e4cd615a51ff98e1879cbe9eecbdfeaf09aa75e9/requests-2.19.1.tar.gz
  Saved ./requests-2.19.1.tar.gz
Successfully downloaded requests
$ python3
Python 3.7.0 (default, Jun 29 2018, 20:13:13)
[Clang 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pkginfo import get_metadata
>>> get_metadata('./requests-2.19.1-py2.py3-none-any.whl').requires_dist
['chardet (<3.1.0,>=3.0.2)', 'idna (<2.8,>=2.5)', 'urllib3
(<1.24,>=1.21.1)', 'certifi (>=2017.4.17)', "pyOpenSSL (>=0.14); extra ==
'security'", "cryptography (>=1.3.4); extra == 'security'", "idna
(>=2.0.0); extra == 'security'", "PySocks (!=1.5.7,>=1.5.6); extra ==
'socks'", 'win-inet-pton; sys_platform == "win32" and (python_version ==
"2.7" or python_version == "2.6") and extra == \'socks\'']
>>>
>>> get_metadata('./requests-2.19.1.tar.gz').requires_dist
()

---------------------------------- %< -------------------------------

Tres Seaver (tseaver)
description: updated
description: updated
Tres Seaver (tseaver)
Changed in pkginfo:
status: New → Confirmed
Revision history for this message
Tres Seaver (tseaver) wrote :

Hmm, looking at the 'requests-2.19.1' wheel vs the sdist: the wheel contains a 'METADATA' file with the expected 'Requires-Dist' headers, generated from the 'install_requires' in the sdist's 'setup.py'. However, the sdist's 'PKG-INFO' file does *not* contain those headers. There isn't much we can do in 'pkginfo' to fix that.

Changed in pkginfo:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.