[Python-modules-commits] [python-qt4] 01/01: Convert from git-dpm to patches unapplied format.
Dmitry Shachnev
mitya57 at moszumanska.debian.org
Fri Jun 30 12:03:36 UTC 2017
This is an automated email from the git hooks/post-receive script.
mitya57 pushed a commit to branch debian/master
in repository python-qt4.
commit 6a970fda44aad40f7b509988d7887c2050f8dc4e
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date: Fri Jun 30 15:03:10 2017 +0300
Convert from git-dpm to patches unapplied format.
---
configure.py | 40 ++++++---
debian/.git-dpm | 11 ---
debian/gbp.conf | 2 +
sip/QtCore/qlist.sip | 224 ---------------------------------------------------
4 files changed, 33 insertions(+), 244 deletions(-)
diff --git a/configure.py b/configure.py
index 6844e6e..6118d39 100644
--- a/configure.py
+++ b/configure.py
@@ -857,6 +857,35 @@ include(%s)
makefile.generate()
tool.append("dbus")
+ # Only include ElementTree for older versions of Python.
+ if sipcfg.py_version < 0x020500:
+ sipconfig.inform("Creating elementtree Makefile...")
+
+ makefile = sipconfig.PythonModuleMakefile(
+ configuration=sipcfg,
+ dstdir=os.path.join(pyqt_modroot, "elementtree"),
+ dir="elementtree"
+ )
+
+ makefile.generate()
+ tool.append("elementtree")
+
+ # Create the pyuic4 wrapper. Use the GUI version on MacOS (so that
+ # previews work properly and normal console use will work anyway), but
+ # not on Windows (so that normal console use will work).
+ sipconfig.inform("Creating pyuic4 wrapper...")
+
+ if sys.platform == 'darwin':
+ gui = True
+
+ if opts.use_arch is None:
+ use_arch = ''
+ else:
+ use_arch = ' '.join(opts.use_arch)
+ else:
+ gui = False
+ use_arch = ''
+
# The pyuic directory may not exist if we are building away from the
# source directory.
try:
@@ -865,6 +894,7 @@ include(%s)
pass
uicdir=os.path.join(pyqt_modroot, "uic")
+ wrapper = sipconfig.create_wrapper(os.path.join(uicdir, "pyuic.py"), os.path.join("pyuic", "pyuic4"), gui, use_arch)
sipconfig.inform("Creating pyuic4 Makefile...")
@@ -873,6 +903,7 @@ include(%s)
dstdir=uicdir,
srcdir=os.path.join(src_dir, "pyuic", "uic"),
dir="pyuic",
+ installs=[[os.path.basename(wrapper), opts.pyqtbindir]]
)
makefile.generate()
@@ -995,10 +1026,6 @@ include(%s)
if src_dir != os.path.curdir:
fout.write("VPATH = %s\n" % os.path.join(src_dir, "designer"))
- fout.write("QMAKE_CFLAGS += %s\n" % macros["CFLAGS"])
- fout.write("QMAKE_CXXFLAGS += %s\n" % macros["CXXFLAGS"])
- fout.write("QMAKE_LFLAGS += %s\n" % macros["LFLAGS"])
-
fout.write(prj)
fout.close()
@@ -1445,10 +1472,6 @@ def set_sip_flags(pyqt):
sip_flags.append("-x")
sip_flags.append("Py_v3")
- # Generate code for a debug build of Python if needed.
- if hasattr(sys, "gettotalrefcount"):
- sip_flags.append("-D")
-
qt_sip_flags.extend(sip_flags)
# There is an issue creating QObjects while the GIL is held causing
@@ -2174,7 +2197,6 @@ def main():
sipconfig.error("This version of PyQt requires SIP v%s or later" % sipconfig.version_to_string(sip_min_version))
global opts
- global macros
# Parse the command line.
p = create_optparser()
diff --git a/debian/.git-dpm b/debian/.git-dpm
deleted file mode 100644
index 477745f..0000000
--- a/debian/.git-dpm
+++ /dev/null
@@ -1,11 +0,0 @@
-# see git-dpm(1) from git-dpm package
-11c61855b641a55547acb9843a7750a7331a25b5
-11c61855b641a55547acb9843a7750a7331a25b5
-3074e63751a1990a2faf4f961405ca3a9b9addfe
-3074e63751a1990a2faf4f961405ca3a9b9addfe
-python-qt4_4.12.orig.tar.gz
-a67a15e7f59578ad6a8dd98d27c8f5100f01fb52
-11098930
-debianTag="debian/%e%v"
-patchedTag="patched/%e%v"
-upstreamTag="upstream/%e%u"
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..3879982
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,2 @@
+[DEFAULT]
+debian-branch=debian/master
diff --git a/sip/QtCore/qlist.sip b/sip/QtCore/qlist.sip
index 63002d2..978e576 100644
--- a/sip/QtCore/qlist.sip
+++ b/sip/QtCore/qlist.sip
@@ -814,227 +814,3 @@ template<qreal, TYPE>
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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-qt4.git
More information about the Python-modules-commits
mailing list