Bug 1323247
Summary: | lcm: Provide a Python 3 subpackage | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Tomas Orsava <torsava> | ||||||
Component: | lcm | Assignee: | Dan Callaghan <dcallagh> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 25 | CC: | dcallagh, dkrejci, mrunge | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2016-08-26 05:22:50 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
Tomas Orsava
2016-04-01 15:51:15 UTC
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. |