Merge pull request #380 from ayhanyalcinsoy/master

added py2 support to python-qt5 and sip
This commit is contained in:
Ertuğrul Erata
2015-09-10 11:53:56 +03:00
4 changed files with 104 additions and 29 deletions
@@ -13,6 +13,7 @@ from pisi.actionsapi import get
WorkDir="PyQt-gpl-%s" % get.srcVERSION()
def setup():
shelltools.copytree("%s/PyQt-gpl-5.4.2" % get.workDIR(), "%s/Py2Qt-gpl-5.4.2" % get.workDIR())
pythonmodules.run("configure.py --confirm-license \
--assume-shared \
--no-timestamp \
@@ -22,16 +23,32 @@ def setup():
--destdir='/usr/lib/python3.4/site-packages/' \
--sip-incdir='/usr/include/python3.4m' \
CFLAGS='%s' CXXFLAGS='%s'" % (get.CFLAGS(), get.CXXFLAGS()), pyVer = "3")
shelltools.cd("%s/Py2Qt-gpl-5.4.2" % get.workDIR())
shelltools.system("python configure.py --confirm-license \
--assume-shared \
--no-timestamp \
--qsci-api \
--destdir='/usr/lib/python2.7/site-packages/' \
--sip-incdir='/usr/include/python2.7' \
--sip /usr/bin/sip2 \
--qmake='/usr/lib/qt5/bin/qmake'")
shelltools.system("find -name 'Makefile' | xargs sed -i 's|-Wl,-rpath,/usr/lib||g;s|-Wl,-rpath,.* ||g'")
def build():
autotools.make()
shelltools.cd("%s/Py2Qt-gpl-5.4.2" % get.workDIR())
autotools.make()
def install():
autotools.rawInstall("-C pyrcc DESTDIR=%(DESTDIR)s INSTALL_ROOT=%(DESTDIR)s" % {'DESTDIR':get.installDIR()})
autotools.rawInstall("-C pylupdate DESTDIR=%(DESTDIR)s INSTALL_ROOT=%(DESTDIR)s" % {'DESTDIR':get.installDIR()})
autotools.rawInstall("DESTDIR=%(DESTDIR)s INSTALL_ROOT=%(DESTDIR)s" % {'DESTDIR':get.installDIR()})
pisitools.rename("/usr/bin/pyuic5", "py3uic5")
shelltools.cd("%s/Py2Qt-gpl-5.4.2" % get.workDIR())
autotools.rawInstall("DESTDIR=%(DESTDIR)s INSTALL_ROOT=%(DESTDIR)s" % {'DESTDIR':get.installDIR()})
pisitools.rename("/usr/bin/pyuic5", "pyuic5")
pisitools.dohtml("doc/html/*")
pisitools.dodoc("NEWS", "README","LICENSE*")
@@ -1,6 +1,6 @@
<PISI>
<Source>
<Name>python3-qt5</Name>
<Name>python-qt5</Name>
<Homepage>http://www.riverbankcomputing.co.uk/software/pyqt</Homepage>
<Packager>
<Name>Ayhan Yalçınsoy</Name>
@@ -37,28 +37,31 @@
</Source>
<Package>
<Name>python3-qt5-common</Name>
<Name>python-qt5-common</Name>
<Summary>Common files shared between python-qt5 and python3-qt5</Summary>
<RuntimeDependencies>
<Dependency>libgcc</Dependency>
<Dependency>python</Dependency>
<Dependency>qt5-base</Dependency>
<Dependency>qt5-declarative</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin/pylupdate5</Path>
<Path fileType="executable">/usr/bin/pyrcc5</Path>
<Path fileType="data">/usr/share/qt5/qsci/api</Path>
<Path fileType="data">/usr/share/sip/PyQt5</Path>
<Path fileType="library">/usr/lib/qt5/plugins/PyQt5/libpyqt5qmlplugin.so</Path>
<Path fileType="library">/usr/lib/qt5/plugins/designer/libpyqt5.so</Path>
</Files>
</Package>
<Package>
<Name>python3-qt5</Name>
<Summary>A set of Python 3.x bindings for the Qt 5.x Toolkit</Summary>
<Name>python-qt5</Name>
<Summary>A set of Python 2.x bindings for the Qt 5.x Toolkit</Summary>
<RuntimeDependencies>
<Dependency>libgcc</Dependency>
<Dependency>dbus</Dependency>
<Dependency>python3</Dependency>
<Dependency release="current">python3-qt5-common</Dependency>
<Dependency release="current">python-qt5-common</Dependency>
<Dependency>qt5-base</Dependency>
<Dependency>qt5-declarative</Dependency>
<Dependency>qt5-sensors</Dependency>
@@ -70,8 +73,29 @@
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin/pyuic5</Path>
<Path fileType="library">/usr/lib/python2.7/site-packages</Path>
</Files>
</Package>
<Package>
<Name>python3-qt5</Name>
<Summary>A set of Python 3.x bindings for the Qt 5.x Toolkit</Summary>
<RuntimeDependencies>
<Dependency>libgcc</Dependency>
<Dependency>dbus</Dependency>
<Dependency release="current">python-qt5-common</Dependency>
<Dependency>qt5-base</Dependency>
<Dependency>qt5-declarative</Dependency>
<Dependency>qt5-sensors</Dependency>
<Dependency>qt5-serialport</Dependency>
<Dependency>qt5-svg</Dependency>
<Dependency>qt5-webkit</Dependency>
<Dependency>qt5-x11extras</Dependency>
<Dependency>qt5-xmlpatterns</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin/py3uic5</Path>
<Path fileType="library">/usr/lib/python3.4/site-packages</Path>
<Path fileType="library">/usr/lib/qt5/plugins</Path>
</Files>
</Package>
+23 -4
View File
@@ -9,22 +9,41 @@ 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 \
-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/bin \
-d /usr/lib/%s/site-packages/ \
-e /usr/include/%s/ \
-e /usr/include/%sm/ \
CFLAGS="%s" CXXFLAGS="%s"' % (py3dir, py3dir, get.CFLAGS(), get.CXXFLAGS()), pyVer = "3")
def build():
autotools.make()
def install():
autotools.rawInstall("DESTDIR=%s -C sipgen" % get.installDIR())
shelltools.cd("../build_python3/%s" % WorkDir)
autotools.make()
def install():
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
pisitools.rename("/usr/bin/sip", "sip2")
shelltools.cd("../build_python3/%s" % WorkDir)
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
+31 -16
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>
@@ -21,22 +22,22 @@
</Source>
<Package>
<Name>sip</Name>
<RuntimeDependencies>
<Dependency>libgcc</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin</Path>
<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>
<AdditionalFile group="root" permission="0644" owner="root" target="/usr/share/sip/fix-linking.diff">fix-linking.diff</AdditionalFile>
</AdditionalFiles>
<Summary>Development files for qscintilla2</Summary>
<RuntimeDependencies>
<Dependency>libgcc</Dependency>
</RuntimeDependencies>
</Package>
<Package>
<Name>python3-sip</Name>
<Files>
@@ -49,21 +50,37 @@
<Dependency release="current">sip</Dependency>
</RuntimeDependencies>
</Package>
<Package>
<Name>sip-devel</Name>
<Files>
<Path fileType="header">/usr/include</Path>
</Files>
<Summary>Development files for sip</Summary>
<Name>python-sip</Name>
<Summary>Python 2.x SIP bindings for C and C++ libraries</Summary>
<RuntimeDependencies>
<Dependency release="current">python3-sip</Dependency>
<Dependency>libgcc</Dependency>
<Dependency>python</Dependency>
<Dependency release="current">sip</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="library">/usr/lib/python2.7/</Path>
</Files>
<Summary>Python 2.x SIP bindings for C and C++ libraries</Summary>
</Package>
<Package>
<Name>sip-devel</Name>
<Summary>Development files for sip</Summary>
<RuntimeDependencies>
<Dependency release="current">sip</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/include/python2.7</Path>
<Path fileType="header">/usr/include/python3.4m</Path>
</Files>
</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>
@@ -77,5 +94,3 @@
</Update>
</History>
</PISI>
<!-- By PiSiDo 2.3.1 -->