Bug 1317886

Summary: python-restsh: Provide a Python 3 subpackage
Product: [Fedora] Fedora Reporter: Tomas Orsava <torsava>
Component: python-restshAssignee: Bohuslav "Slavek" Kabrda <bkabrda>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: bkabrda, cstratak, dkrejci, mhroncok
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-07-29 10:08: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: 1285816, 1333770    
Attachments:
Description Flags
python 3 support none

Description Tomas Orsava 2016-03-15 12:54:38 UTC
Upstream, 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 ok to do this in Rawhide only, however, it would be greatly
appreciated if you could push it to Fedora 24 as well.


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 Dominika Krejčí 2016-05-11 08:44:27 UTC
Hello Slavek,

what about this package? Do you need any help adding Python 3 support to the RPM?

If you need more instructions, a [guide] for porting Python-based RPMs is available.

[guide] http://python-rpm-porting.readthedocs.org/en/latest/index.html

Comment 2 Bohuslav "Slavek" Kabrda 2016-05-11 14:30:07 UTC
Hi Dominika, I currently have no time to do this. If you need this done soon, feel free and request comaintainership in pkgdb - I'll be glad to grant it to you and then you can add the python3 subpackage yourself.

Comment 3 Charalampos Stratakis 2016-06-09 14:17:49 UTC
Created attachment 1166314 [details]
python 3 support

A patch to provide Python 3 support.

Also package is updated to latest snapshot.

Koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=14435847

Also tested in mock and works.

Comment 4 Jan Kurik 2016-07-26 04:06:41 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 5 Miro Hrončok 2016-07-27 10:15:20 UTC
Applying: Provide a Python 3 subpackage
error: patch failed: python-restsh.spec:1
error: python-restsh.spec: patch does not apply
Patch failed at 0001 Provide a Python 3 subpackage
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Comment 6 Miro Hrončok 2016-07-27 11:52:24 UTC
Rebased the patch, will apply.

Comment 8 Charalampos Stratakis 2016-07-29 10:08:58 UTC
Repos are synched so did some more testing in mock. Everything works correct.

Package is imported in python by: import restshlib, and binary works as expected from the python3 subpackage. Note that in order for the binary to work you cannot be in a higher level than the home directory, as it will give a traceback for not finding the ~/.restsh-history file.