Bug 1311520

Summary: python-cmdln: Provide a Python 3 subpackage
Product: [Fedora] Fedora Reporter: Tomas Orsava <torsava>
Component: python-cmdlnAssignee: Andrea Veri <andrea.veri>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: andrea.veri, pviktori
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-20 14:11:17 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    

Description Tomas Orsava 2016-02-24 12:07:45 UTC
Upstream (versions 2.x), this software supports Python 3.
Please provide a Python 3 package for Fedora.


According to the Python packaging guidelines [0], 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 [1].

The current best practice is to provide subpackages for the two Python
versions (called "Common SRPM" in the guidelines). Alternatively, if
nothing depends on your Python2 package, you can just switch to Python 3
entirely.

It's fine to do this in Rawhide only.


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] https://fedoraproject.org/wiki/Packaging:Python
[1] https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file

Comment 1 Petr Viktorin (pviktori) 2016-04-19 13:20:44 UTC
Andrea, do you need any help with the update and the Python 3 subpackage?

Comment 2 Andrea Veri 2016-04-20 09:57:29 UTC
Hey Petr! I should be able to push an updated package to rawhide today. One question though: how do you want me to perform main package to python2-cmldn transition when it comes to move Py2 files over to it? 

Right now the main package (python-cmdln) does contain the Python 2 files and migrating to the new layout would mean leaving the main package itself with no files at all. My idea would be to add a dependency between python-cmdln and python2-cmdln for default installations while leaving users the freedom to install the python3 package too if they really want to.

What do you think?

Comment 3 Andrea Veri 2016-04-20 11:08:20 UTC
Seems the provides are automagically set:

 /var/lib/mock/fedora-rawhide-x86_64/result $ rpm -qp --provides python2-cmdln-2.0.0-1.fc25.noarch.rpm
python-cmdln = 2.0.0-1.fc25
python2-cmdln = 2.0.0-1.fc25

That means we shouldn't need any specific dependency in place between the old and new package. I did commit all the changes [1], can you please verify it looks OK before I go ahead and update the package?

Thanks!

[1] http://pkgs.fedoraproject.org/cgit/rpms/python-cmdln.git/commit/?id=25610f6a0693e4a9b1ef226a9de3fad4dbcf1302

Comment 4 Petr Viktorin (pviktori) 2016-04-20 12:33:08 UTC
Right, "Provides: python-cmdln" is set by the "python_provide" macro.

The changes look OK!

Comment 5 Petr Viktorin (pviktori) 2016-04-20 12:33:23 UTC
Thanks for your effort!

Comment 6 Andrea Veri 2016-04-20 14:11:17 UTC
You're welcome! Package is finally built [1]. Let me know if you want me to build it for any other Fedora release.

[1] http://koji.fedoraproject.org/koji/buildinfo?buildID=756259