Bug 1323228

Summary: FlightCrew: Please use python3 shebang
Product: [Fedora] Fedora Reporter: Tomas Orsava <torsava>
Component: FlightCrewAssignee: Hans de Goede <hdegoede>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: dan, fredhgl, hdegoede, lbalhar, mhroncok, pviktori
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: FlightCrew-0.9.1-3.fc25 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-27 10:33:42 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    
Attachments:
Description Flags
patch for the Flightcrew-plugin
none
Another patch for all shebangs in the Flightcrew package changed to py3
none
resend of the patch that change shebang of the plugin
none
Fixing python shebang none

Description Tomas Orsava 2016-04-01 15:23:30 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 Hans de Goede 2016-04-01 18:44:46 UTC
We do not provide a python subpackage at all, the only .py file in FlightCrew 0.9.1 (the current version) is a plugin for Sigil, which is already using python3.

Comment 2 Petr Viktorin (pviktori) 2016-04-03 13:01:38 UTC
Sorry for the wrong diagnosis.

The plugin's shebang, #!/usr/bin/python, causes the FlightCrew-sigil-plugin RPM to depend on Python 2. Could the shebang be changed to /usr/bin/python3?

Comment 3 Frederico Lima 2016-07-16 12:05:55 UTC
May I make a patch for you?

Comment 4 Hans de Goede 2016-07-16 13:50:45 UTC
(In reply to Frederico Henrique Gonçalves Lima from comment #3)
> May I make a patch for you?

I have this on my todo list but at a low priority, so yes a patch would definitely be welcome.

Thanks,

Hans

p.s.

I'm going on vacation for 2 weeks starting this Monday, so if it takes a while to apply the patch that is why.

Comment 5 Frederico Lima 2016-07-18 22:12:54 UTC
Created attachment 1181331 [details]
patch for the Flightcrew-plugin

I've changed the shebang to python3 on the
/src/FlightCrew-plugin/plugin.py

can you check if its correct?
Thanks

Comment 6 Frederico Lima 2016-07-18 22:27:14 UTC
Created attachment 1181335 [details]
Another patch for all shebangs in the Flightcrew package changed to py3

I've created another patch.
The difference is that this new patch don't change only the plugin shebangs, but all the shebangs, from python to python3 and the envs on the package.

If its not the plan of the maintainer, use only the first patch, the patch that change only the plugin shebang.

Comment 7 Frederico Lima 2016-07-19 06:10:01 UTC
Created attachment 1181413 [details]
resend of the patch that change shebang of the plugin

resend of the patch that change shebang of the plugin

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

Comment 9 Lumír Balhar 2016-07-28 09:23:09 UTC
This patch is simple and looks good to me. If you want to apply it during RPM building process we can help you with change in specfile but it will be simple as well.

Comment 10 Lumír Balhar 2016-08-09 12:04:25 UTC
Created attachment 1189230 [details]
Fixing python shebang

Hello.

I am providing patch for specfile in which I am using `sed` command to change python shebang instead of patch in separated file.

It's up to the maintainer to decide which approach is better for this package.

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

Have a nice day.

Comment 11 Hans de Goede 2016-08-12 10:39:59 UTC
Thanks for the patches.

I've gone with the patch using the sed as that should avoid the need to rebase patches when updating to a newer upstream version.

I've started builds with this patch for F25+, closing.

Comment 12 Miro Hrončok 2016-08-12 18:52:21 UTC
25 now has bodhi, please don't forget to do the update.

Comment 13 Fedora Update System 2016-08-13 17:48:01 UTC
FlightCrew-0.9.1-3.fc25 sigil-0.9.6-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-890e97bb53

Comment 14 Fedora Update System 2016-08-15 18:27:44 UTC
FlightCrew-0.9.1-3.fc25, sigil-0.9.6-1.fc25 has been pushed to the Fedora 25 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-2016-890e97bb53

Comment 15 Fedora Update System 2016-08-27 10:33:34 UTC
FlightCrew-0.9.1-3.fc25, sigil-0.9.6-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.