[Python-modules-commits] r7129 - in packages/python-qt4/trunk/debian (5 files)
ncommander-guest at users.alioth.debian.org
ncommander-guest at users.alioth.debian.org
Sun Dec 21 06:12:01 UTC 2008
Date: Sunday, December 21, 2008 @ 06:11:59
Author: ncommander-guest
Revision: 7129
* Merge of patches from Ubuntu to correct ARM support
- Added debian/patches/03_qreal_float_support.dpatch
- Renamed debian/patches/kubuntu_01_armel_support.dpatch
to better suite its contents and for Debian
- Modifed pyqtconfig from python-qt4-dev to python-qt4
* debian/rules
- Modified debian/rules to install pyqtconfig.py files into
python-qt4 vs. python-qt4-dev. This is because python-qt4
is arch any, and python-qt4-dev is arch all, and the config
file can be different on different architectures (i.e. ARM)
* debian/control:
- Added necessary conflict/replaces to python-qt4
* debian/patches/kubuntu_01_armel_support.dpatch (LP: #308814)
- Corrects a configuration test which caused qreals to end up
as floats on non-ARM architectures, and as doubles on ARM architectures.
- Added handling of doubles on qreal != float for QLists
Added:
packages/python-qt4/trunk/debian/patches/03_qreal_float_support.dpatch
Modified:
packages/python-qt4/trunk/debian/changelog
packages/python-qt4/trunk/debian/control
packages/python-qt4/trunk/debian/patches/00list
packages/python-qt4/trunk/debian/rules
Modified: packages/python-qt4/trunk/debian/changelog
===================================================================
--- packages/python-qt4/trunk/debian/changelog 2008-12-19 20:43:44 UTC (rev 7128)
+++ packages/python-qt4/trunk/debian/changelog 2008-12-21 06:11:59 UTC (rev 7129)
@@ -1,10 +1,34 @@
-python-qt4 (4.4.4-3) experimental; urgency=low
+python-qt4 (4.4.4-3) UNRELEASED; urgency=low
+ [ Torsten Marek ]
* debian/control
- increase python-sip4 dependecy to 4.7.9, needed by python-qt4-phonon
- -- Torsten Marek <shlomme at debian.org> Sun, 30 Nov 2008 12:56:29 +0100
+ [ Michael Casadevall ]
+ * Merge of patches from Ubuntu to correct ARM support
+ - Added debian/patches/03_qreal_float_support.dpatch
+ - Renamed debian/patches/kubuntu_01_armel_support.dpatch
+ to better suite its contents and for Debian
+ - Modifed pyqtconfig from python-qt4-dev to python-qt4
+ * debian/rules
+ - Modified debian/rules to install pyqtconfig.py files into
+ python-qt4 vs. python-qt4-dev. This is because python-qt4
+ is arch any, and python-qt4-dev is arch all, and the config
+ file can be different on different architectures (i.e. ARM)
+ * debian/control:
+ - Added necessary conflict/replaces to python-qt4
+ -- Michael Casadevall <sonicmctails at gmail.com> Sun, 21 Dec 2008 01:09:39 -0500
+
+python-qt4 (4.4.4-2ubuntu1) jaunty; urgency=low
+
+ * debian/patches/kubuntu_01_armel_support.dpatch (LP: #308814)
+ - Corrects a configuration test which caused qreals to end up
+ as floats on non-ARM architectures, and as doubles on ARM architectures.
+ - Added handling of doubles on qreal != float for QLists
+
+ -- Michael Casadevall <sonicmctails at gmail.com> Tue, 16 Dec 2008 02:58:05 -0500
+
python-qt4 (4.4.4-2) experimental; urgency=low
* debian/patches
Modified: packages/python-qt4/trunk/debian/control
===================================================================
--- packages/python-qt4/trunk/debian/control 2008-12-19 20:43:44 UTC (rev 7128)
+++ packages/python-qt4/trunk/debian/control 2008-12-21 06:11:59 UTC (rev 7129)
@@ -2,7 +2,7 @@
Section: python
Priority: optional
Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
-Uploaders: Torsten Marek <shlomme at debian.org>
+Uploaders: Torsten Marek <shlomme at debian.org>, Michael Casadevall <sonicmctails at gmail.com>
Build-Depends: debhelper (>= 5.0.38), python-all-dev, libqt4-dev (>= 4.3.0), sip4 (>= 4.7.8), python-sip4-dev (>= 4.7.8), python-central (>= 0.6), dpatch, python-dbus (>= 0.80.0), python-dbus-dbg, libdbus-1-dev (>= 1.0.2), python-all-dbg, python-sip4-dbg, libqt4-opengl-dev, libphonon-dev (>= 4:4.2.0-2)
Build-Conflicts: python-xml, python-xml-dbg
Standards-Version: 3.8.0
@@ -16,6 +16,7 @@
Provides: ${python:Provides}
Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-sip4 (>= 4.7.9), python-sip4 (<< 4.8), python-elementtree | python (>= 2.5), python-qt4-common
Suggests: python-qt4-dbg
+Replaces: python-qt4-dev (<< 4.4.2-3~)
XB-Python-Version: ${python:Versions}
Description: Python bindings for Qt4
PyQt4 exposes the Qt4 API to Python. The following modules are supported:
Modified: packages/python-qt4/trunk/debian/patches/00list
===================================================================
--- packages/python-qt4/trunk/debian/patches/00list 2008-12-19 20:43:44 UTC (rev 7128)
+++ packages/python-qt4/trunk/debian/patches/00list 2008-12-21 06:11:59 UTC (rev 7129)
@@ -1,2 +1,3 @@
01_configure
02_htmllinks
+03_qreal_float_support
Added: packages/python-qt4/trunk/debian/patches/03_qreal_float_support.dpatch
===================================================================
--- packages/python-qt4/trunk/debian/patches/03_qreal_float_support.dpatch (rev 0)
+++ packages/python-qt4/trunk/debian/patches/03_qreal_float_support.dpatch 2008-12-21 06:11:59 UTC (rev 7129)
@@ -0,0 +1,252 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_qreal_float_support.dpatch by Michael Casadevall <sonicmctails at gmail.com>
+##
+## DP: Corrects a configure test, and adds explicate double handling
+## to qlist.sip on architectures where qreal != double
+
+ at DPATCH@
+diff -urNad python-qt4-4.4.4~/configure.py python-qt4-4.4.4/configure.py
+--- python-qt4-4.4.4~/configure.py 2008-12-16 04:08:33.000000000 -0500
++++ python-qt4-4.4.4/configure.py 2008-12-16 04:09:49.000000000 -0500
+@@ -1659,8 +1659,9 @@
+ out << "PyQt_NoPrintRangeBug\\n";
+ #endif
+
+- if (sizeof (qreal) != sizeof (double))
++#if defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE)
+ out << "PyQt_qreal_double\\n";
++#endif
+
+ return 0;
+ }
+diff -urNad python-qt4-4.4.4~/sip/QtCore/qlist.sip python-qt4-4.4.4/sip/QtCore/qlist.sip
+--- python-qt4-4.4.4~/sip/QtCore/qlist.sip 2008-12-16 04:08:10.000000000 -0500
++++ python-qt4-4.4.4/sip/QtCore/qlist.sip 2008-12-16 04:08:33.000000000 -0500
+@@ -612,3 +612,227 @@
+ return sipGetState(sipTransferObj);
+ %End
+ };
++
++// If we're on an architecture where qreal == double, then we need to also
++// explicately handle doubles. On architectures where qreal == double, they
++// will automaticially be cast upwards
++
++%If (!PyQt_qreal_double)
++
++%If (Qt_4_3_0 -)
++// QList<QPair<double, double> > is implemented as a Python list of 2-element tuples.
++%MappedType QList<QPair<double, double> >
++{
++%TypeHeaderCode
++#include <qlist.h>
++#include <qpair.h>
++%End
++
++%ConvertFromTypeCode
++ // Create the list.
++ PyObject *l;
++
++ if ((l = PyList_New(sipCpp->size())) == NULL)
++ return NULL;
++
++ // Set the list elements.
++ for (int i = 0; i < sipCpp->size(); ++i)
++ {
++ const QPair<double, double> &p = sipCpp->at(i);
++ PyObject *pobj;
++
++ if ((pobj = Py_BuildValue((char *)"dd", p.first, p.second)) == NULL)
++ {
++ Py_DECREF(l);
++
++ return NULL;
++ }
++
++ PyList_SET_ITEM(l, i, pobj);
++ }
++
++ return l;
++%End
++
++%ConvertToTypeCode
++ SIP_SSIZE_T len;
++
++ // Check the type if that is all that is required.
++ if (sipIsErr == NULL)
++ {
++ if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
++ return 0;
++
++ for (SIP_SSIZE_T i = 0; i < len; ++i)
++ {
++ PyObject *tup = PySequence_ITEM(sipPy, i);
++
++ if (!PySequence_Check(tup) || PySequence_Size(tup) != 2)
++ return 0;
++ }
++
++ return 1;
++ }
++
++ QList<QPair<double, double> > *ql = new QList<QPair<double, double> >;
++ len = PySequence_Size(sipPy);
++
++ for (SIP_SSIZE_T i = 0; i < len; ++i)
++ {
++ PyObject *tup = PySequence_ITEM(sipPy, i);
++
++ double first = PyFloat_AsDouble(PySequence_ITEM(tup, 0));
++ double second = PyFloat_AsDouble(PySequence_ITEM(tup, 1));
++
++ ql->append(QPair<double, double>(first, second));
++ }
++
++ *sipCppPtr = ql;
++
++ return sipGetState(sipTransferObj);
++%End
++};
++%End
++%If (Qt_4_3_0 -)
++// QList<QPair<double, TYPE> > is implemented as a Python list of 2-element tuples.
++template<double, TYPE>
++%MappedType QList<QPair<double, TYPE> >
++{
++%TypeHeaderCode
++#include <qlist.h>
++#include <qpair.h>
++%End
++
++%ConvertFromTypeCode
++ // Create the list.
++ PyObject *l;
++
++ if ((l = PyList_New(sipCpp->size())) == NULL)
++ return NULL;
++
++ // Set the list elements.
++ for (int i = 0; i < sipCpp->size(); ++i)
++ {
++ const QPair<double, TYPE> &p = sipCpp->at(i);
++ TYPE *t = new TYPE(p.second);
++ PyObject *pobj;
++
++ if ((pobj = sipBuildResult(NULL, "(dB)", p.first, t, sipClass_TYPE, sipTransferObj)) == NULL)
++ {
++ Py_DECREF(l);
++ delete t;
++
++ return NULL;
++ }
++
++ PyList_SET_ITEM(l, i, pobj);
++ }
++
++ return l;
++%End
++
++%ConvertToTypeCode
++ SIP_SSIZE_T len;
++
++ // Check the type if that is all that is required.
++ if (sipIsErr == NULL)
++ {
++ if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
++ return 0;
++
++ for (SIP_SSIZE_T i = 0; i < len; ++i)
++ {
++ PyObject *tup = PySequence_ITEM(sipPy, i);
++
++ if (!PySequence_Check(tup) || PySequence_Size(tup) != 2)
++ return 0;
++
++ if (!sipCanConvertToInstance(PySequence_ITEM(tup, 1), sipClass_TYPE, SIP_NOT_NONE))
++ return 0;
++ }
++
++ return 1;
++ }
++
++ QList<QPair<double, TYPE> > *ql = new QList<QPair<double, TYPE> >;
++ len = PySequence_Size(sipPy);
++
++ for (SIP_SSIZE_T i = 0; i < len; ++i)
++ {
++ PyObject *tup = PySequence_ITEM(sipPy, i);
++ double d;
++ int state;
++
++ d = PyFloat_AsDouble(PySequence_ITEM(tup, 0));
++ TYPE *t = reinterpret_cast<TYPE *>(sipConvertToInstance(PySequence_ITEM(tup, 1), sipClass_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++
++ if (*sipIsErr)
++ {
++ sipReleaseInstance(t, sipClass_TYPE, state);
++
++ delete ql;
++ return 0;
++ }
++
++ ql->append(QPair<double, TYPE>(d, *t));
++
++ sipReleaseInstance(t, sipClass_TYPE, state);
++ }
++
++ *sipCppPtr = ql;
++
++ return sipGetState(sipTransferObj);
++%End
++};
++%End
++
++// QList<double> is implemented as a Python list of doubles.
++%MappedType QList<double>
++{
++%TypeHeaderCode
++#include <qlist.h>
++%End
++
++%ConvertFromTypeCode
++ // Create the list.
++ PyObject *l;
++
++ if ((l = PyList_New(sipCpp->size())) == NULL)
++ return NULL;
++
++ // Set the list elements.
++ for (int i = 0; i < sipCpp->size(); ++i)
++ {
++ PyObject *pobj;
++
++ if ((pobj = PyFloat_FromDouble(sipCpp->value(i))) == NULL)
++ {
++ Py_DECREF(l);
++
++ return NULL;
++ }
++
++ PyList_SET_ITEM(l, i, pobj);
++ }
++
++ return l;
++%End
++
++%ConvertToTypeCode
++ // Check the type if that is all that is required.
++ if (sipIsErr == NULL)
++ return (PySequence_Check(sipPy) && PySequence_Size(sipPy) >= 0);
++
++ QList<double> *ql = new QList<double>;
++ SIP_SSIZE_T len = PySequence_Size(sipPy);
++
++ for (SIP_SSIZE_T i = 0; i < len; ++i)
++ ql->append(PyFloat_AsDouble(PySequence_ITEM(sipPy, i)));
++
++ *sipCppPtr = ql;
++
++ return sipGetState(sipTransferObj);
++%End
++};
++
++%End
Property changes on: packages/python-qt4/trunk/debian/patches/03_qreal_float_support.dpatch
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: packages/python-qt4/trunk/debian/rules
===================================================================
--- packages/python-qt4/trunk/debian/rules 2008-12-19 20:43:44 UTC (rev 7128)
+++ packages/python-qt4/trunk/debian/rules 2008-12-21 06:11:59 UTC (rev 7129)
@@ -87,10 +87,9 @@
dh_installdirs -i
for version in ${PYTHONS};\
do\
+ mkdir -p debian/python-qt4-dev/usr/lib/python$$version/site-packages/PyQt4;\
mkdir -p debian/python-qt4-common/usr/lib/python$$version/site-packages/PyQt4;\
install -m 644 -o root -g root __init__.py debian/python-qt4-common/usr/lib/python$$version/site-packages/PyQt4;\
- mkdir -p debian/python-qt4-dev/usr/lib/python$$version/site-packages/PyQt4;\
- install -m 644 -o root -g root build-$$version/pyqtconfig.py debian/python-qt4-dev/usr/lib/python$$version/site-packages/PyQt4;\
done
dh_install -i
@@ -104,6 +103,8 @@
for v in ${PYTHONS}; do \
$(MAKE) -C build-$$v install \
INSTALL_ROOT=$(CURDIR)/debian/tmp DESTDIR=$(CURDIR)/debian/tmp; \
+ mkdir -p debian/python-qt4/usr/lib/python$$v/site-packages/PyQt4;\
+ install -m 644 -o root -g root build-$$v/pyqtconfig.py debian/python-qt4/usr/lib/python$$v/site-packages/PyQt4;\
done
set -e; \
More information about the Python-modules-commits
mailing list