Repository navigation
Conversation
mcepl
left a comment
There was a problem hiding this comment.
Please, consider my comments.
| def pypi_text_metaextract(library): | ||
| # parse metadata from python module which already exists | ||
| pkg_info_lines = metadata.metadata(library) | ||
| return pypi_text_items(pkg_info_lines.items()) |
There was a problem hiding this comment.
The new installed-package metadata path loses descriptions and runtime dependencies. This function processes only metadata headers, dropping the description body. It retains dependencies as requires_dist, but templates consume install_requires, and this path skips archive augmentation.
There was a problem hiding this comment.
Rechecked at c00b9e9. This is still reproducible: parsing Metadata-Version: 2.1\nName: example\nVersion: 1.0\nRequires-Dist: requests\n\nExample description\n returns requires_dist: ["requests"], but no description or install_requires. Both text-metadata entry points still pass only .items(), so the description body is discarded. Please preserve the body and convert the metadata dependencies into the fields consumed by the templates, including when --local uses installed metadata without a source archive.
There was a problem hiding this comment.
Rechecked at 8a17563. The description body is kept now, thanks. One part is left: install_requires is copied straight from Requires-Dist, markers included. With Requires-Dist: pysocks; extra == "socks" and Requires-Dist: tomli>=1; python_version<"3.11", both end up in install_requires unchanged. When there is no archive to augment from (--local on an installed package), they render as Requires: python-pysocks; extra == "socks", which is not valid RPM and makes an optional extra a hard dependency. Please drop extra-only requirements (or move them to extras_require) and run the rest through _requirements_sanitize().
b97ddb8 to
c00b9e9
Compare
mcepl
left a comment
There was a problem hiding this comment.
Rechecked c00b9e9. The --add-script initialization and the previously observed --maintainer crash are fixed, and all six current CI checks pass. The metadata-loss finding remains open. I have reopened the archive-directory thread because the default still fails on older sdists; the new override also exposes the separate installed-metadata path problem below.
c53864c to
788ac69
Compare
774ae88 to
bd1cf54
Compare
|
Yeah, this is overly broad, I really hate to return to this PR, which is a sign for me, something’s wrong. Could you, please, split this into a few focused PRs? It currently combines metadata parsing from local packages and archives, changes to generated RPM spec paths, and CLI options including the maintainer fix for #235. These are useful changes, but reviewing and testing them separately would make it clearer which behavior each PR changes and easier to catch regressions. I suggest submitting the metadata work, spec-generation changes, and CLI/maintainer changes separately. |
Fix username #238 |
Fix builds in openSUSE and Fedora from generated specs, add option to get metadata from archive and local module, repair code related to metadata processing, fix #235