From 104f488f0ea9c65231e4ae68912248f267b2e153 Mon Sep 17 00:00:00 2001 From: ayhanyalcinsoy Date: Thu, 10 Sep 2015 09:15:05 +0300 Subject: [PATCH] python-qt:added py2 support --- .../language/python/python-qt5/actions.py | 21 +++++++++- .../language/python/python-qt5/pspec.xml | 38 +++++++++++++++---- 2 files changed, 50 insertions(+), 9 deletions(-) diff --git a/programming/language/python/python-qt5/actions.py b/programming/language/python/python-qt5/actions.py index d7cc3734ac..58b511d84d 100644 --- a/programming/language/python/python-qt5/actions.py +++ b/programming/language/python/python-qt5/actions.py @@ -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/sip \ + --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*") - diff --git a/programming/language/python/python-qt5/pspec.xml b/programming/language/python/python-qt5/pspec.xml index 9cf891e27f..5fe4b4c370 100644 --- a/programming/language/python/python-qt5/pspec.xml +++ b/programming/language/python/python-qt5/pspec.xml @@ -1,6 +1,6 @@ - python3-qt5 + python-qt5 http://www.riverbankcomputing.co.uk/software/pyqt Ayhan Yalçınsoy @@ -37,28 +37,31 @@ - python3-qt5-common + python-qt5-common Common files shared between python-qt5 and python3-qt5 libgcc + python qt5-base + qt5-declarative /usr/bin/pylupdate5 /usr/bin/pyrcc5 /usr/share/qt5/qsci/api /usr/share/sip/PyQt5 + /usr/lib/qt5/plugins/PyQt5/libpyqt5qmlplugin.so + /usr/lib/qt5/plugins/designer/libpyqt5.so - python3-qt5 - A set of Python 3.x bindings for the Qt 5.x Toolkit + python-qt5 + A set of Python 2.x bindings for the Qt 5.x Toolkit libgcc dbus - python3 - python3-qt5-common + python-qt5-common qt5-base qt5-declarative qt5-sensors @@ -70,8 +73,29 @@ /usr/bin/pyuic5 + /usr/lib/python2.7/site-packages + + + + + python3-qt5 + A set of Python 3.x bindings for the Qt 5.x Toolkit + + libgcc + dbus + python-qt5-common + qt5-base + qt5-declarative + qt5-sensors + qt5-serialport + qt5-svg + qt5-webkit + qt5-x11extras + qt5-xmlpatterns + + + /usr/bin/py3uic5 /usr/lib/python3.4/site-packages - /usr/lib/qt5/plugins