sip:added py2 support

This commit is contained in:
2015-09-10 09:15:43 +03:00
parent 104f488f0e
commit 63e3f9a0c6
2 changed files with 46 additions and 11 deletions
+27 -5
View File
@@ -9,22 +9,44 @@ from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import pythonmodules
from pisi.actionsapi import get
WorkDir = "sip-%s" % get.srcVERSION()
py2dir = get.curPYTHON()
py3dir = "python3.4"
def setup():
shelltools.system("find . -type f -exec sed -i 's/Python.h/python3.4m\/Python.h/g' {} \;")
shelltools.cd("..")
shelltools.makedirs("build_python3")
shelltools.copytree("./%s" % WorkDir, "build_python3")
shelltools.cd(WorkDir)
pythonmodules.run('configure.py \
-b /usr/bin \
-d /usr/lib/%s/site-packages/ \
-b /usr/local/bin \
-d /usr/lib/%s/site-packages \
-e /usr/include/%s/ \
CFLAGS+="%s" CXXFLAGS+="%s"' % (py2dir, py2dir, get.CFLAGS(), get.CXXFLAGS()))
shelltools.cd("../build_python3/%s" % WorkDir)
pythonmodules.run('configure.py \
-b /usr/local/bin \
-d /usr/lib/%s/site-packages/ \
-e /usr/include/%sm/ \
CFLAGS="%s" CXXFLAGS="%s"' % (py3dir, py3dir, get.CFLAGS(), get.CXXFLAGS()), pyVer = "3")
def build():
autotools.make()
shelltools.cd("../build_python3/%s" % WorkDir)
autotools.make()
def install():
autotools.rawInstall("DESTDIR=%s -C sipgen" % get.installDIR())
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
pisitools.rename("/usr/local/bin/sip", "sip2")
pisitools.dosym("/usr/local/bin/sip2", "/usr/bin/sip2")
shelltools.cd("../build_python3/%s" % WorkDir)
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
pisitools.rename("/usr/local/bin/sip", "sip")
pisitools.dosym("/usr/local/bin/sip", "/usr/bin/sip")
+19 -6
View File
@@ -12,8 +12,9 @@
<Description>SIP is a tool for generating bindings for C and C++ libraries so that they can be used by Python. It takes any C or C++ libraries and converts them into Python extension modules.</Description>
<BuildDependencies>
<Dependency>python3-devel</Dependency>
<Dependency>python-devel</Dependency>
</BuildDependencies>
<Archive sha1sum="ec467c1ca9f9ead16be869eccc2e7cae72750d56" type="targz">mirrors://sourceforge/pyqt/sip-4.16.7.tar.gz</Archive>
<Archive sha1sum="c0a09aa63523293c5ca39444746b1cef1253a0c5" type="targz">mirrors://sourceforge/pyqt/sip-4.16.9.tar.gz</Archive>
<Patches>
<Patch level="1">no-strip.patch</Patch>
<Patch level="1">sip-outoftree.patch</Patch>
@@ -26,7 +27,7 @@
<Path fileType="executable">/usr/local/bin</Path>
<Path fileType="executable">/usr/sbin</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="data">/usr/share/sip3</Path>
<Path fileType="data">/usr/share/sip</Path>
</Files>
<AdditionalFiles>
<AdditionalFile group="root" permission="0644" owner="root" target="/usr/share/sip/disable-rpaths.diff">disable-rpaths.diff</AdditionalFile>
@@ -49,21 +50,33 @@
<Dependency release="current">sip</Dependency>
</RuntimeDependencies>
</Package>
<Package>
<Name>python-sip</Name>
<Files>
<Path fileType="library">/usr/lib/python2.7/</Path>
</Files>
<Summary>Python 2.x SIP bindings for C and C++ libraries</Summary>
<RuntimeDependencies>
<Dependency>libgcc</Dependency>
<Dependency>python</Dependency>
<Dependency release="current">sip</Dependency>
</RuntimeDependencies>
</Package>
<Package>
<Name>sip-devel</Name>
<Files>
<Path fileType="header">/usr/include</Path>
<Path fileType="header">/usr/include/python2.7</Path>
<Path fileType="header">/usr/include/python3.4m</Path>
</Files>
<Summary>Development files for sip</Summary>
<RuntimeDependencies>
<Dependency release="current">python3-sip</Dependency>
<Dependency release="current">sip</Dependency>
</RuntimeDependencies>
</Package>
<History>
<Update release="2">
<Date>2015-06-14</Date>
<Version>4.16.7</Version>
<Date>2015-09-09</Date>
<Version>4.16.9</Version>
<Comment>Version Bump.</Comment>
<Name>Ayhan Yalçınsoy</Name>
<Email>ayhanyalcinsoy@pisilinux.org</Email>