Bug 1546814

Summary: python-tld: python3-tld requires both Python 2 and Python 3
Product: [Fedora] Fedora Reporter: Iryna Shcherbina <ishcherb>
Component: python-tldAssignee: William Moreno <williamjmorenor>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: jberan, williamjmorenor
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-16 20:12:28 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: 1285816, 1312032, 1340802    

Description Iryna Shcherbina 2018-02-19 16:24:59 UTC
The python3-tld (0.7.9-4.fc28) RPM requires both Python 2 and Python 3:

$  dnf --disablerepo=* --enablerepo=rawhide repoquery --requires python3-tld | grep python
/usr/bin/python2
/usr/bin/python3
python(abi) = 3.6
...

This happened due to recently introduced shebangs mangling [0], and you might see the warnings in the build log:

> + /usr/lib/rpm/redhat/brp-mangle-shebangs
> *** WARNING: mangling shebang in ./usr/lib/python3.6/site-packages/tld/bin/update-tld-names from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!

The executable contains `#!/usr/bin/env python` shebang, which is forbidden by the guidelines and is automatically mangled to `#!/usr/bin/python2` during build. Please fix the shebang to be `#!/usr/bin/python3` explicitly [1].

If anything is unclear, or if you need any kind of assistance, you can
ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy
to help investigating or fixing this issue!

[0] https://pagure.io/packaging-committee/issue/738#comment-490366
[1] http://python-rpm-porting.readthedocs.io/en/latest/application-modules.html#fixing-shebangs

Comment 1 Fedora End Of Life 2018-02-20 15:37:59 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 2 Jan Beran 2018-03-16 16:29:33 UTC
Hello William,

I have prepared a Pagure PR which fixes the issue:

https://src.fedoraproject.org/rpms/python-tld/pull-request/1

May I ask to review and merge the PR?

Comment 3 William Moreno 2018-03-16 20:09:37 UTC
have merged it, is building now:

https://koji.fedoraproject.org/koji/taskinfo?taskID=25748472