extra/pyqt to 4.9.5-2

This commit is contained in:
Kevin Mihelich 2012-10-18 03:39:00 +00:00
parent 355bbe2a57
commit d15c6bb6c0
2 changed files with 7 additions and 97 deletions

View file

@ -8,24 +8,21 @@
pkgbase=pyqt
pkgname=('pyqt-common' 'pyqt' 'python2-pyqt')
pkgver=4.9.4
pkgver=4.9.5
pkgrel=2
arch=('i686' 'x86_64')
url="http://riverbankcomputing.co.uk/software/pyqt/intro"
license=('GPL')
makedepends=('qt' 'python-sip' 'python-dbus' 'python2-sip' 'phonon'
'python-opengl' 'qt-assistant-compat' 'qtwebkit' 'python2-dbus')
source=("http://riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-x11-gpl-${pkgver}.tar.gz"
"PyQt4-4.7.3-qreal_float_support.patch"
'fix-pyuic4.patch')
md5sums=('a0b6a820633366365af5124ddbd059c7'
'a20d7022e91071f838bd4908851a0f7b'
'python2-opengl' 'qt-assistant-compat' 'qtwebkit' 'python2-dbus')
source=("http://downloads.sourceforge.net/${pkgbase}/PyQt-x11-gpl-${pkgver}.tar.gz"
"PyQt4-4.7.3-qreal_float_support.patch")
md5sums=('e4cdd6619c63655f7510efb4df8462fb'
'c493d8ea8e3199d649b60eeb45e07aec')
build() {
cd "${srcdir}"/PyQt-x11-gpl-${pkgver}
patch -p1 -i "${srcdir}"/PyQt4-4.7.3-qreal_float_support.patch
patch -p1 -i "${srcdir}"/fix-pyuic4.patch
cd "${srcdir}"
cp -r PyQt-x11-gpl-${pkgver} Py2Qt-x11-gpl-${pkgver}
@ -59,7 +56,6 @@ package_pyqt-common(){
cd "${srcdir}/PyQt-x11-gpl-${pkgver}"
make -C pyrcc DESTDIR="${pkgdir}" install
make -C pylupdate DESTDIR="${pkgdir}" install
make -C designer INSTALL_ROOT="${pkgdir}" install
install -Dm644 PyQt4.api "${pkgdir}"/usr/share/qt/qsci/api/python/PyQt4.api
}
@ -77,7 +73,6 @@ package_pyqt(){
# Provided by pyqt-common
rm "${pkgdir}"/usr/bin/{pylupdate4,pyrcc4}
rm "${pkgdir}"/usr/lib/qt/plugins/designer/libpythonplugin.so
rm "${pkgdir}"/usr/share/qt/qsci/api/python/PyQt4.api
}
@ -85,7 +80,7 @@ package_python2-pyqt(){
pkgdesc="A set of Python 2.x bindings for the Qt toolkit"
depends=('qtwebkit' 'python2-sip' 'python2-dbus' 'pyqt-common')
optdepends=('phonon: enable audio and video in PyQt applications'
'python-opengl: enable OpenGL 3D graphics in PyQt applications'
'python2-opengl: enable OpenGL 3D graphics in PyQt applications'
'qscintilla: QScintilla API'
'qt-assistant-compat: add PyQt online help in Qt Assistant')
provides=('python2-qt')
@ -97,7 +92,7 @@ package_python2-pyqt(){
# Fix conflicts with pyqt
mv "${pkgdir}"/usr/bin/{,python2-}pyuic4
# Provided by pyqt-common
# Provided by pyqt
rm "${pkgdir}"/usr/bin/{pylupdate4,pyrcc4}
rm "${pkgdir}"/usr/lib/qt/plugins/designer/libpythonplugin.so
rm "${pkgdir}"/usr/share/qt/qsci/api/python/PyQt4.api

View file

@ -1,85 +0,0 @@
diff -urN a/pyuic/uic/Compiler/qobjectcreator.py b/pyuic/uic/Compiler/qobjectcreator.py
--- a/pyuic/uic/Compiler/qobjectcreator.py 2012-06-26 07:09:46.000000000 -0600
+++ b/pyuic/uic/Compiler/qobjectcreator.py 2012-07-18 09:41:19.483732249 -0600
@@ -1,6 +1,6 @@
#############################################################################
##
-## Copyright (C) 2011 Riverbank Computing Limited.
+## Copyright (C) 2012 Riverbank Computing Limited.
## Copyright (C) 2006 Thorsten Marek.
## All right reserved.
##
@@ -100,7 +100,6 @@
assert widgetClass not in self._widgets
self._widgets[widgetClass] = (baseClass, module)
-
def _resolveBaseclass(self, baseClass):
try:
for x in range(0, 10):
@@ -114,19 +113,17 @@
except KeyError:
raise ValueError("unknown baseclass %s" % baseClass)
-
def search(self, cls):
try:
- self._usedWidgets.add(cls)
baseClass = self._resolveBaseclass(self._widgets[cls][0])
DEBUG("resolved baseclass of %s: %s" % (cls, baseClass))
-
- return type(cls, (baseClass,),
- {"module" : ""})
-
except KeyError:
return None
+ self._usedWidgets.add(cls)
+
+ return type(cls, (baseClass, ), {"module" : ""})
+
def _writeImportCode(self):
imports = {}
for widget in self._usedWidgets:
diff -urN a/pyuic/uic/objcreator.py b/pyuic/uic/objcreator.py
--- a/pyuic/uic/objcreator.py 2012-06-26 07:09:46.000000000 -0600
+++ b/pyuic/uic/objcreator.py 2012-07-18 09:39:01.227387101 -0600
@@ -102,19 +102,26 @@
self._modules.append(self._customWidgets)
def createQObject(self, classname, *args, **kwargs):
- # Handle scoped names, typically static factory methods.
- parts = classname.split('.')
- factory = self.findQObjectType(parts[0])
-
- if factory is not None:
- for part in parts[1:]:
- factory = getattr(factory, part, None)
- if factory is None:
- break
- else:
- return self._cpolicy.instantiate(factory, *args, **kwargs)
+ # Handle regular and custom widgets.
+ factory = self.findQObjectType(classname)
- raise NoSuchWidgetError(classname)
+ if factory is None:
+ # Handle scoped names, typically static factory methods.
+ parts = classname.split('.')
+
+ if len(parts) > 1:
+ factory = self.findQObjectType(parts[0])
+
+ if factory is not None:
+ for part in parts[1:]:
+ factory = getattr(factory, part, None)
+ if factory is None:
+ break
+
+ if factory is None:
+ raise NoSuchWidgetError(classname)
+
+ return self._cpolicy.instantiate(factory, *args, **kwargs)
def invoke(self, rname, method, args=()):
return self._cpolicy.invoke(rname, method, args)