Bug 2048090

Summary: python3-humanize provides python3dist(humanize) = 0
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-humanizeAssignee: Steve Traylen <steve.traylen>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jakub, projects.rg, steve.traylen
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-humanize-3.13.1-3.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-02-01 00:26:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2047774, 2048077    

Description Miro Hrončok 2022-01-29 12:17:21 UTC
The package python3-humanize has the following automatic provide:

  python3dist(humanize) = 0

It appears that the actual package version was lost during the packaging process. 

In most cases, this is caused by using a Source that misses version information, e.g. A GitHub tarball when the project uses setuptools_scm or pbr. See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_source_files_from_pypi

This bugzilla was created in a batch, so it does not have information about the exact cause for this package. If you need help figuring out why this happens in this particular package, feel free to ask.

Comment 1 Raphael Groner 2022-01-30 18:25:48 UTC
I fail to see any relation to source tarball as there's definitely a version given as well in %prep to extract. 
To build, standard with macro %py3_build is used. Why setuptools_scm then as there's no BuildRequires for that?

Comment 2 Miro Hrončok 2022-01-30 20:53:55 UTC
I see this in pyproject.toml:

[build-system]
requires = [..., "setuptools_scm[toml]>=3.4"]

...
[tool.setuptools_scm]
local_scheme = "no-local-version"


And there is no version in either setup.py or setup.cfg.

There's indeed no BuildRequires for setuptools_scm, which I believe is a mistake. Furthermore, a tarball from GitHub is used as a source, hence the version information is lost.

Comment 3 Fedora Update System 2022-01-31 19:12:57 UTC
FEDORA-2022-10cfa451bb has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-10cfa451bb

Comment 4 Fedora Update System 2022-01-31 19:14:54 UTC
FEDORA-2022-10cfa451bb has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Miro Hrončok 2022-01-31 20:17:16 UTC
python-humanize-3.13.1-2.fc36 actually removed the provides altogteher. The culprit is that %{python3_sitelib}/humanize-%{version}.dist-info/ is not owned by the package.

Here's my attempt to fix it with further cleanup: https://src.fedoraproject.org/rpms/python-humanize/pull-request/7

Comment 6 Steve Traylen 2022-01-31 20:35:35 UTC
Thankyou , got the provides and then lost the directory and provides (it seems) when I marked the LICENSE as %license.

Steve.