Bug 545124

Summary: RFE: Support python3 when building sip
Product: [Fedora] Fedora Reporter: Dave Malcolm <dmalcolm>
Component: sipAssignee: Than Ngo <than>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: kevin, rdieter, than
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-27 21:11:32 UTC Type: ---
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: 526126, 554799    
Bug Blocks: 530636, 586196    
Attachments:
Description Flags
modified (not-yet-working) version of sip.spec
none
Patch against devel/sip.spec none

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