Bug 545124 - RFE: Support python3 when building sip
Summary: RFE: Support python3 when building sip
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: sip
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 526126 554799
Blocks: Python3F13 586196
TreeView+ depends on / blocked
 
Reported: 2009-12-07 16:43 UTC by Dave Malcolm
Modified: 2010-04-27 21:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-04-27 21:11:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
modified (not-yet-working) version of sip.spec (13.93 KB, text/plain)
2009-12-07 16:48 UTC, Dave Malcolm
no flags Details
Patch against devel/sip.spec (4.88 KB, patch)
2010-04-26 20:16 UTC, Dave Malcolm
no flags Details | Diff

Description Dave Malcolm 2009-12-07 16:43:37 UTC
(Following up on FUDCon Toronto discussion)

I'm attaching a modified version of sip.spec that emits python3-sip and python3-sip-devel subpackages from the main sip build.

This is a work-in-progress, with known issues - see the FIXMEs (also, blocked until we have python3 itself in rawhide).

Comment 1 Dave Malcolm 2009-12-07 16:48:02 UTC
Created attachment 376729 [details]
modified (not-yet-working) version of sip.spec

Comment 2 Dave Malcolm 2009-12-07 16:54:51 UTC
(In reply to comment #0)
> (Following up on FUDCon Toronto discussion)
(this discussion was between myself, rdieter and Ben Boeckel)

Comment 3 Rex Dieter 2010-01-08 16:03:50 UTC
* Fri Jan 08 2010 Rex Dieter <rdieter> - 4.10-0.2.20100102
- RFE: Support python3 when building sip (#545124)
- drop old pre v4 changelog

Comment 4 Dave Malcolm 2010-01-14 16:10:40 UTC
Reopening, here's the current status as I understand it:
  - python3 is now in rawhide (see http://lists.fedoraproject.org/pipermail/devel/2010-January/129185.html )
  - sip.spec currently has:   %global with_python3 0
  - sip.spec still has a couple of FIXMEs relating to this; I believe that merely enabling the above boolean will trash the python2 build, so some more work is needed here, alas.

Comment 5 Dave Malcolm 2010-04-26 20:16:33 UTC
Created attachment 409281 [details]
Patch against devel/sip.spec

The attached patch (against devel/sip.spec) fixes various issues with the python3 support, and enables it in the build.

I think the initial patch was done before we merged the Python 3 guidelines into https://fedoraproject.org/wiki/Packaging:Python

python3-devel now provides a "py3dir" macro, so we use this, rather than "python3dir"

I named the python 3 sip binary "/usr/bin/python3-sip": the guidelines suggest standardizing on a "python3-" prefix for distinguishing python3 executables within /usr/bin from their python 2 counterparts.

The "macros.sip" file applies to rpm-build as a whole, and thus with both sip-devel and python3-sip-devel, so I moved it out into a new subpackage.  Does that seem sane?

I've only tested this so far by building it locally, installing it, and trying to "import sip" within the python3 interactive console.  Seems to work, and I'll have a look at PyQT4 with it.

Comment 6 Rex Dieter 2010-04-26 20:19:55 UTC
woo, awesome, I'll try to get a fc14 build going.

(or feel free to apply for commit access and "just do it", and we can iteratively get things working that way too).

Comment 7 Dave Malcolm 2010-04-27 21:11:32 UTC
Looks like you went ahead and did this as sip-4.10.2-2.fc14:
  http://koji.fedoraproject.org/koji/buildinfo?buildID=168863


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