Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1308552 - pg_view: : Provide a Python 3 subpackage
Summary: pg_view: : Provide a Python 3 subpackage
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pg_view
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lorenzo Dalrio
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3
TreeView+ depends on / blocked
 
Reported: 2016-02-15 13:48 UTC by Petr Viktorin (pviktori)
Modified: 2016-02-17 14:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-17 14:11:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Viktorin (pviktori) 2016-02-15 13:48:11 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 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 Lorenzo Dalrio 2016-02-15 17:38:14 UTC
Petr, please can you point me to a package similar to this one that already ships python3 sub-package? Do i need to rename the package by adding the python- prefix?

Thank you!

Comment 2 Charalampos Stratakis 2016-02-16 15:21:30 UTC
Some spec file examples: [0][1]. There are numerous others at fedora dist-git [2]. Checking various different cases especially in newest packages that follow the guidelines is a good strategy. Adding the python prefix would also be a good change from various perspectives, most python packages use that. Please refer to [4] regarding the renaming process.

If you have any more questions do not hesitate to ask.


[0] http://pkgs.fedoraproject.org/cgit/rpms/python-inifile.git/plain/python-inifile.spec
[1] http://pkgs.fedoraproject.org/cgit/rpms/python-argh.git/plain/python-argh.spec
[2] http://pkgs.fedoraproject.org/cgit/rpms/
[3] https://fedoraproject.org/wiki/Package_Renaming_Process

Comment 3 Petr Viktorin (pviktori) 2016-02-16 15:43:09 UTC
Actually, since pg_view is a tool, not a Python library others would import, you can just switch to Python 3 entirely.

After you update to the newest upstream release of pg_view, switch the shebang to /usr/bin/python3. Let me know if that doesn't work.

Comment 4 Petr Viktorin (pviktori) 2016-02-16 15:46:46 UTC
And, the python2-/python3- prefix is only necessary for libraries, so there's no need to rename the package.

Comment 5 Lorenzo Dalrio 2016-02-17 14:11:31 UTC
Thank you for the useful info. I have updated pg_view to the latest release and for rawhide i have changed the shebang to /usr/bin/python3 as suggested by Petr.

Comment 6 Petr Viktorin (pviktori) 2016-02-17 14:31:32 UTC
Yipee! Thanks for your help!


Note You need to log in before you can comment on or make changes to this bug.