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
Hello Dan, 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
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle. Changing version to '25'.
Adding a Python 3 subpackage is not easy. The lcm build does not use setuptools, it builds with automake using AM_PATH_PYTHON which doesn't have any support for side-by-side Python 2 and Python 3 builds, it just builds for whatever is the first Python version it finds.
From my reading it seems there is a way to specify the Python version: $ export PYTHON_VERSION=$(python -c "import sys; print(\"%s.%s\" % sys.version_info[:2])") https://lcm-proj.github.io/build_instructions.html
Here's what I've seen packages do in similar cases: - In build, copy the source to a separate directory, and do an extra build there passing python3 to configure. Then do the same in install. See [pyglet] for a very simple example. There might be ways to avoid building everything once. - Create a new package just for the py3 bindings. - Work with upstream to support side-by-side py2/py3 builds. - Drop Python 2. As always, let us know if you need help. If you'd like to invite others to solve this, you can set thit bug to block [PY3PATCH-REQUESTED]. [pyglet] http://pkgs.fedoraproject.org/cgit/rpms/python-pyglet.git/tree/python-pyglet.spec#n109 [PY3PATCH-REQUESTED] https://bugzilla.redhat.com/show_bug.cgi?id=1333765
A patch would be very welcome, I don't actually use lcm or have any experience with it, I've kind of ended up maintaining it by default because... reasons. I guess the simplest (but most wasteful) option is just redo the whole build a second time with Python 3 enabled and then grab the modules out of that at the end.
I'll try to make a patch for that.
Created attachment 1193755 [details] Patch that adds Python 3 support Here's the patch! %changelog: - Added support for Python 3 — new subpackage lcm-python3 - The package is now being built two times, once with Python 2 bindings and the second time with Python 3 bindigs - Renamed subpackage lcm-python to lcm-python2, added provides and obsoletes for the name lcm-python What do you think?
Thanks Tomas. I guess if we are renaming the -python subpackage we might as well switch the name around to the preferred naming style (python2-lcm / python3-lcm) right? Also we can probably use the %{python_provide} macro to handle the Provides/Obsoletes.
Created attachment 1193932 [details] Patch that adds Python 3 support Oh, you're absolutely right, I thought there was a naming exception for bindings, I was mistaken. Here's the updated version! However, the explicit Provides and Obsoletes have to stay to provide the old name lcm-python. Koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=15373678
Thanks Tomas! Yes you are right, we need to explicitly Provide/Obsolete the lcm-python name. Built in rawhide: http://koji.fedoraproject.org/koji/buildinfo?buildID=794528 I won't push this to stable releases, unless somebody particularly wants it.