Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: The Python dependency generator should generate `purl(pkg:pypi/$NAME@$VERSION)` Provides alongside the existing `python*dist($NAME) = $RPM_VERSION` Provides. NAME is the normalized package name (https://packageurl.org/docs/purl-spec/types/definitions/pypi-definition#name-definition) and VERSION is the Python version (_not_ the RPM-compatible version). There should be a macro that can be defined or undefine to disable generating the purl() Provides for packages that don't exist on PyPI and thus shouldn't have a `pkg:pypi` purl. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Build a package includes a Python package with dist-info 2. rpm -qp --provides ./python3-*.rpm | grep purl Actual results: Expected results: "purl(pkg:pypi/flit-core.2)" Additional info: https://fedoraproject.org/wiki/Changes/Adopt_PURL_Metadata https://discussion.fedoraproject.org/t/f45-change-proposal-adopt-purl-metadata-system-wide/192435/
I was actually already thinking about this. The bit that needs to be designed is the opt-out mechanism. I'll ask in the discussion: https://discussion.fedoraproject.org/t/f45-change-proposal-adopt-purl-metadata-system-wide/192435/50 (This feature can be drafted even before that.)
Note: VERSION is the **normalized** Python version
https://github.com/package-url/purl-spec/blob/fe214b861021ff32ad495627e3031d370c319b9e/docs/types/definitions/pypi-definition.md?plain=1#L32 > Replace dot . with underscore _ when used in distribution (sdist, wheel) names I don't really understand this rule. But it appears we cannot just use PEP 503 normalization.
(In reply to Miro Hrončok from comment #2) > Note: VERSION is the **normalized** Python version But maybe it isn't :D The standard is not very clear.