Bug 1309385 - python-pymilter: Provide a Python 3 subpackage [NEEDINFO]
python-pymilter: Provide a Python 3 subpackage
Status: NEW
Product: Fedora
Classification: Fedora
Component: python-pymilter (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Paul Wouters
Fedora Extras Quality Assurance
Depends On:
Blocks: PYTHON3
  Show dependency treegraph
Reported: 2016-02-17 11:21 EST by Petr Viktorin
Modified: 2018-01-31 00:17 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
dkrejci: needinfo? (pwouters)

Attachments (Terms of Use)
Here is a first cut that builds (7.10 KB, text/plain)
2017-05-22 23:10 EDT, Stuart D Gathman
no flags Details
pymilter-dns_dsn.patch (1.40 KB, patch)
2017-05-22 23:15 EDT, Stuart D Gathman
no flags Details | Diff

  None (edit)
Description Petr Viktorin 2016-02-17 11:21:13 EST
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 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 Jan Kurik 2016-02-24 10:25:04 EST
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
Comment 2 Dominika Krejčí 2016-04-20 09:15:30 EDT
Hello Paul,

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 3 Jan Beran 2016-10-25 09:01:03 EDT
I prepared a spec file that provides Python 3 subpackage. However, mock reports several C API related errors for Python 3 version. I open GitHub issue for the problem [https://github.com/sdgathman/pymilter/issues/11]. Let's wait for an upstream fix.
Comment 4 Jan Beran 2016-11-01 10:54:48 EDT
Hi Paul,

Python 3 version spec file is available in upstream [https://github.com/sdgathman/pymilter/blob/master/py3milter.spec]. A slight update will be probably required (e.g. from ...-pydns to python3-py3dns).

Do you need any help adding Python 3 support to the RPM?
Comment 5 Stuart D Gathman 2016-11-01 16:20:30 EDT
There will be an upstream release when I finalize what is str vs bytes on the python3 side.  I'll create an issue so people can comment.

Comment 6 Stuart D Gathman 2017-03-19 23:38:16 EDT
To compile python3, my spec file applies a patch to miltermodule.c.  All the python code and most of the C code remains the same that way.
Comment 7 Stuart D Gathman 2017-05-01 21:02:09 EDT
I checked out python-pymilter and started on this.  The Fedora packaging guide wants to make python2-pymilter and python3-pymilter, and have python-pymilter require the system_python version.  

The snag is that there are some common files/dirs between python2 and python3. I can't stick them in python-pymilter, or you'll always get the system_python version.  I guess they need to go in python-common, and have both subpackages require python-common.
Comment 8 Stuart D Gathman 2017-05-22 23:10 EDT
Created attachment 1281309 [details]
Here is a first cut that builds

Need to add the python-pymilter-common package as discussed, I think.
Comment 9 Stuart D Gathman 2017-05-22 23:15 EDT
Created attachment 1281310 [details]

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