Bug 1564095

Summary: py_dist3 doesn't handle dependencies with dots properly
Product: [Fedora] Fedora Reporter: Pavel Zhukov <pzhukov>
Component: python-rpm-macrosAssignee: Tomas Orsava <torsava>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, j, mcyprian, orion, torsava
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-rpm-macros-3-28.fc29 python-rpm-macros-3-28.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-11 23:02:54 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:

Description Pavel Zhukov 2018-04-05 10:56:27 UTC
Description of problem:
%py_dist_name blindly replace everything with dashes

Version-Release number of selected component (if applicable):
python-srpm-macros-3-26.fc28.noarch

How reproducible:
100%

Steps to Reproduce:
mailman.spec: Requires: %{py3_dist flufl.lock}
mock: No matching package to install: 'python3dist(flufl-lock)'
# dnf repoquery --provides python3-flufl-lock
python3dist(flufl.lock) = 2.4.1

Expected results:
python3-flufl-lock installed

Additional info:

Comment 1 Tomas Orsava 2018-04-06 09:32:37 UTC
Interesting bug, thanks for reporting!

I'll fix the macro to not convert dots.

Comment 2 Tomas Orsava 2018-04-06 10:19:43 UTC
Fixed in rawhide, please test.

If there are no problems we might want to push this into live Fedoras as well.

Comment 4 Fedora Update System 2018-04-09 12:35:12 UTC
python-rpm-macros-3-28.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-f0b9ca38cc

Comment 6 Fedora Update System 2018-04-09 21:56:04 UTC
python-rpm-macros-3-28.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-f0b9ca38cc

Comment 7 Fedora Update System 2018-04-11 23:02:54 UTC
python-rpm-macros-3-28.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Tomas Orsava 2018-04-12 13:08:31 UTC
So, it turns out that the behaviour was actually the correct one, it looks like the bug is in setuptools.

Here's a PR for setuptools with an explanation: https://github.com/pypa/setuptools/pull/1324

Ideally this should be fixed in setuptools and then the previous rules of canonization should be restored here in python-rpm-macros.