Bug 1313853 - cdbs: Provide a Python 3 subpackage
Summary: cdbs: Provide a Python 3 subpackage
Alias: None
Product: Fedora
Classification: Fedora
Component: cdbs
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Sandro Mani
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: PYTHON3
TreeView+ depends on / blocked
Reported: 2016-03-02 13:00 UTC by Tomas Orsava
Modified: 2016-03-06 11:21 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-03-06 11:21:50 UTC

Attachments (Terms of Use)

Description Tomas Orsava 2016-03-02 13:00:31 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

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 Sandro Mani 2016-03-02 13:06:27 UTC
I suppose this package was picked up because its source archive contains some py files? Anyhow, the package does not actually contain any python modules.


Comment 2 Petr Viktorin 2016-03-02 13:17:47 UTC
I expect that it was picked up because of /usr/libexec/cdbs/waf-unpack, which does have a Python shebang. This drags in python2 as a dependency.

Comment 3 Sandro Mani 2016-03-02 13:20:42 UTC
Indeed. That should be okay though, assuming the script also works with python3, right?

Comment 4 Petr Viktorin 2016-03-02 13:29:35 UTC
Currently, a Fedora install always has a py3 interpreter (since dnf depends on it). Python 2 is not in the default install, it's only installed with individual packages that require it.
Since the cdbs RPM now depends on Python 2, chances are that installing it will pull in an extra interpreter. Changing the shebang to #!/usr/bin/python3 would prevent this.

Comment 5 Sandro Mani 2016-03-02 15:54:04 UTC
Ah ok, I see now that /usr/bin/python will keep pointing to python2. I'll change the shebang.

Comment 6 Sandro Mani 2016-03-06 11:21:50 UTC
cdbs-0.4.130-4.fc25 built.

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