From 104f488f0ea9c65231e4ae68912248f267b2e153 Mon Sep 17 00:00:00 2001 From: ayhanyalcinsoy Date: Thu, 10 Sep 2015 09:15:05 +0300 Subject: [PATCH 1/4] 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 From 63e3f9a0c68949029a79c00e1b8015c79a716e50 Mon Sep 17 00:00:00 2001 From: ayhanyalcinsoy Date: Thu, 10 Sep 2015 09:15:43 +0300 Subject: [PATCH 2/4] sip:added py2 support --- programming/language/python/sip/actions.py | 32 ++++++++++++++++++---- programming/language/python/sip/pspec.xml | 25 +++++++++++++---- 2 files changed, 46 insertions(+), 11 deletions(-) diff --git a/programming/language/python/sip/actions.py b/programming/language/python/sip/actions.py index 02a17fec25..3dd943701d 100644 --- a/programming/language/python/sip/actions.py +++ b/programming/language/python/sip/actions.py @@ -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") diff --git a/programming/language/python/sip/pspec.xml b/programming/language/python/sip/pspec.xml index e5efe7d98a..2ebe0c6fd8 100644 --- a/programming/language/python/sip/pspec.xml +++ b/programming/language/python/sip/pspec.xml @@ -12,8 +12,9 @@ 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. python3-devel + python-devel - mirrors://sourceforge/pyqt/sip-4.16.7.tar.gz + mirrors://sourceforge/pyqt/sip-4.16.9.tar.gz no-strip.patch sip-outoftree.patch @@ -26,7 +27,7 @@ /usr/local/bin /usr/sbin /usr/share/doc - /usr/share/sip3 + /usr/share/sip disable-rpaths.diff @@ -49,21 +50,33 @@ sip + + python-sip + + /usr/lib/python2.7/ + + Python 2.x SIP bindings for C and C++ libraries + + libgcc + python + sip + + sip-devel - /usr/include + /usr/include/python2.7 + /usr/include/python3.4m Development files for sip - python3-sip sip - 2015-06-14 - 4.16.7 + 2015-09-09 + 4.16.9 Version Bump. Ayhan Yalçınsoy ayhanyalcinsoy@pisilinux.org From c30b0027f972357f5cf2187eb96ecf56b176c16e Mon Sep 17 00:00:00 2001 From: ayhanyalcinsoy Date: Thu, 10 Sep 2015 10:54:01 +0300 Subject: [PATCH 3/4] python-qt5:fixed for sip --- programming/language/python/python-qt5/actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programming/language/python/python-qt5/actions.py b/programming/language/python/python-qt5/actions.py index 58b511d84d..afd125bec1 100644 --- a/programming/language/python/python-qt5/actions.py +++ b/programming/language/python/python-qt5/actions.py @@ -31,7 +31,7 @@ def setup(): --qsci-api \ --destdir='/usr/lib/python2.7/site-packages/' \ --sip-incdir='/usr/include/python2.7' \ - --sip /usr/bin/sip \ + --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'") From 5525e562b4749431aa115d709527abccdc3a92f4 Mon Sep 17 00:00:00 2001 From: ayhanyalcinsoy Date: Thu, 10 Sep 2015 10:54:30 +0300 Subject: [PATCH 4/4] sip:fixed usr/bin/sip --- programming/language/python/sip/actions.py | 9 +++---- programming/language/python/sip/pspec.xml | 28 ++++++++++++---------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/programming/language/python/sip/actions.py b/programming/language/python/sip/actions.py index 3dd943701d..e1034e2829 100644 --- a/programming/language/python/sip/actions.py +++ b/programming/language/python/sip/actions.py @@ -22,14 +22,14 @@ def setup(): shelltools.copytree("./%s" % WorkDir, "build_python3") shelltools.cd(WorkDir) pythonmodules.run('configure.py \ - -b /usr/local/bin \ + -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/local/bin \ + -b /usr/bin \ -d /usr/lib/%s/site-packages/ \ -e /usr/include/%sm/ \ CFLAGS="%s" CXXFLAGS="%s"' % (py3dir, py3dir, get.CFLAGS(), get.CXXFLAGS()), pyVer = "3") @@ -42,11 +42,8 @@ def build(): def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) - pisitools.rename("/usr/local/bin/sip", "sip2") - pisitools.dosym("/usr/local/bin/sip2", "/usr/bin/sip2") + pisitools.rename("/usr/bin/sip", "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") diff --git a/programming/language/python/sip/pspec.xml b/programming/language/python/sip/pspec.xml index 2ebe0c6fd8..bba6519503 100644 --- a/programming/language/python/sip/pspec.xml +++ b/programming/language/python/sip/pspec.xml @@ -22,6 +22,9 @@ sip + + libgcc + /usr/bin /usr/local/bin @@ -33,11 +36,8 @@ disable-rpaths.diff fix-linking.diff - Development files for qscintilla2 - - libgcc - + python3-sip @@ -50,29 +50,33 @@ sip + python-sip - - /usr/lib/python2.7/ - Python 2.x SIP bindings for C and C++ libraries libgcc python sip + + /usr/lib/python2.7/ + + Python 2.x SIP bindings for C and C++ libraries + sip-devel - - /usr/include/python2.7 - /usr/include/python3.4m - Development files for sip sip + + /usr/include/python2.7 + /usr/include/python3.4m + + 2015-09-09 @@ -90,5 +94,3 @@ - -