Missing metadata from some sdists
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pkginfo |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Via e-mail, wim (wim.glenn@
-------
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:/
Installing collected packages: pkginfo
Successfully installed pkginfo-1.4.2
$ pip download --no-deps requests
Collecting requests
Using cached
https:/
Saved ./requests-
Successfully downloaded requests
$ pip download --no-deps --no-binary :all: requests
Collecting requests
Using cached
https:/
Saved ./requests-
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(
['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(
()
-------
description: | updated |
description: | updated |
Changed in pkginfo: | |
status: | New → Confirmed |
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.