Bug 582007

Summary: RFE: add libsemanage-python3 subpackage to build
Product: [Fedora] Fedora Reporter: Dave Malcolm <dmalcolm>
Component: libsemanageAssignee: Daniel Walsh <dwalsh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-06 15:58:26 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: 582006    
Bug Blocks:    
Attachments:
Description Flags
Patch to devel's libsemanage.spec to add a python3 subpackage
none
libsemanage-2.0.45-support-multiple-python-builds.patch none

Description Dave Malcolm 2010-04-13 20:07:04 UTC
Please can you add a libsemanage-python3 subpackage to the build.

As I understand it SWIG from F11 onwards can generate both Python 2 and Python
3 code, you just have to point it at the correct /usr/bin/python or python3
binary

An example of generalizing a specfile to build two different subpackages can be
seen at bug 536948

with this diff:
http://cvs.fedoraproject.org/viewvc/rpms/python-coverage/devel/python-coverage.spec?r1=1.7&r2=1.8

Notes on packaging can be seen here
http://fedoraproject.org/wiki/Packaging/Python

Comment 1 Dave Malcolm 2010-04-27 22:18:11 UTC
Created attachment 409603 [details]
Patch to devel's libsemanage.spec to add a python3 subpackage

Comment 2 Dave Malcolm 2010-04-27 22:19:18 UTC
Created attachment 409605 [details]
libsemanage-2.0.45-support-multiple-python-builds.patch

Generalize the build to support building the Python bindings against multiple Python runtimes.

Comment 3 Dave Malcolm 2010-04-27 22:20:17 UTC
Compiles, but is barely tested:
[david@surprise devel]$ rpm -q libsemanage-python3
libsemanage-python3-2.0.45-4.fc14.x86_64
[david@surprise devel]$ python3
Python 3.1.2 (r312:79147, Mar 21 2010, 16:44:26) 
[GCC 4.4.3 20100127 (Red Hat 4.4.3-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import semanage
>>> h = semanage.semanage_handle_create()
>>> h
<Swig Object of type 'struct semanage_handle *' at 0xa22420>
>>>

Comment 4 Daniel Walsh 2010-05-06 15:58:26 UTC
Fixed in libsemanage-2_0_45-4_fc14