Bug 1453185

Summary: gnatcoll: Switch to Python 3
Product: [Fedora] Fedora Reporter: Iryna Shcherbina <ishcherb>
Component: gnatcollAssignee: Pavel Zhukov <pzhukov>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: pzhukov
Target Milestone: ---Keywords: Reopened
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-02-22 13:16:36 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: 1444614    
Bug Blocks: 1285816    

Description Iryna Shcherbina 2017-05-22 10:54:50 UTC
Upstream, this software supports Python 3 [0]. Please provide a Python 3
package for Fedora.


According to the Python packaging guidelines [1], software must be
packaged for Python 3 if upstream supports it.
The guidelines give detailed information on how to do this, and even
provide an example spec file [2].

Since users aren't expected to import this tool from Python code,
you can just switch to /usr/bin/python3. Alternatively, if you want or
need to keep a Python 2 version, the current best practice is to provide
subpackages -- this is called "Common SRPM" in the guidelines.

It's OK to do this in Rawhide only, however, it would be greatly
appreciated if you could push it to Fedora 25 as well.


If you need more instructions, a guide for porting Python-based RPMs is
available at [3].
If anything is unclear, or if you need any kind of assistance with the
porting, you can ask on IRC (#fedora-python on Freenode), or reply here.
We'll be happy to help!


[0] http://libre.adacore.com/developers/development-log-single/NF-15-L619-031-gnatcoll
[1] https://fedoraproject.org/wiki/Packaging:Python
[2] https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file
[3] http://python-rpm-porting.readthedocs.io/

Comment 1 Pavel Zhukov 2017-07-20 15:28:29 UTC
gnatcoll in rawhide doesn't depend on python/python2 anymore. Actually it's built without python support because of bugs in upstream aclocal script.

Comment 2 Iryna Shcherbina 2018-02-19 12:19:25 UTC
Reopening the bug, as gnatcoll-2017-11.fc28 started to depend on `/usr/bin/python2` since version 2017-11.

This happened, due to recently introduced shebangs mangling [0].
You might see the warning in the build log:

> *** WARNING: mangling shebang in ./usr/share/gnatcoll/dborm.py from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!

Given that `dborm.py` is compatible with Python 2 and Python 3, please switch the shebang to `#!/usr/bin/python3` manually.


[0] https://pagure.io/packaging-committee/issue/738#comment-490366

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

Comment 4 Pavel Zhukov 2018-02-22 13:16:36 UTC
Patched.