Skip to content

Commit 7fcd5f2

Browse files
committed
Fix #33: Try reading long_description from payload body
Updates the test_arg_mapping case to handle setuptools >= 57, which writes the long_description field as the payload/body of PKG-INFO, skipping the previous `Description:` field entirely. This results in the missing key from the Message object, so the test then expects to read long_description from the payload.
1 parent 72f6af5 commit 7fcd5f2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

dowsing/tests/setuptools_metadata.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ def test_arg_mapping(self) -> None:
9696
a = setup_py_info.get_all(field.metadata.key)
9797
b = setup_cfg_info.get_all(field.metadata.key)
9898

99+
# setuptools>=57 writes long_description to the body/payload
100+
# of PKG-INFO, and skips the description field entirely.
101+
if field.keyword == "long_description" and a is None:
102+
a = setup_py_info.get_payload()
103+
b = setup_cfg_info.get_payload()
104+
99105
# install_requires gets written out to *.egg-info/requires.txt
100106
# instead
101107
if field.keyword != "install_requires":

0 commit comments

Comments
 (0)