Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 767099 Details for
Bug 813312
dev-python/python-poppler-qt5-0.75.0 - error: command /usr/bin/sip failed with exit code 1
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for release 21.1.0
python-poppler-qt5-21.1.0-unsupported-function-return-type.patch (text/plain), 2.76 KB, created by
Jan Breig
on 2022-03-15 11:02:23 UTC
(
hide
)
Description:
Patch for release 21.1.0
Filename:
MIME Type:
Creator:
Jan Breig
Created:
2022-03-15 11:02:23 UTC
Size:
2.76 KB
patch
obsolete
>diff --git a/project.py b/project.py >index 17df8da..74e397c 100644 >--- a/project.py >+++ b/project.py >@@ -42,7 +42,7 @@ class PopplerQt5Bindings(PyQtBindings): > def run_pkg_config(option): > output = subprocess.check_output( > ['pkg-config', option, 'poppler-qt5'], >- text=True) >+ universal_newlines=True) > return output.rstrip() > > def apply_user_defaults(self, tool): >diff --git a/types.sip b/types.sip >index 239b8c9..81cb283 100644 >--- a/types.sip >+++ b/types.sip >@@ -331,5 +331,98 @@ template <TYPE> > }; > > >+/** >+ * Convert QVector< QPair<TYPE, TYPE> > >+ * from and to a Python list of a 2-item tuple >+ */ >+ >+template<TYPE> >+%MappedType QVector< QPair<TYPE, TYPE> > >+{ >+%TypeHeaderCode >+#include <qvector.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) >+ { >+ QPair<TYPE, TYPE>* p = new QPair<TYPE, TYPE>(sipCpp->at(i)); >+ PyObject *ptuple = PyTuple_New(2); >+ PyObject *pfirst; >+ PyObject *psecond; >+ >+ TYPE *sfirst = new TYPE(p->first); >+ if ((pfirst = sipConvertFromType(sfirst, sipType_TYPE, sipTransferObj)) == NULL) >+ { >+ Py_DECREF(l); >+ Py_DECREF(ptuple); >+ return NULL; >+ } >+ PyTuple_SET_ITEM(ptuple, 0, pfirst); >+ >+ TYPE *ssecond = new TYPE(p->second); >+ if ((psecond = sipConvertFromType(ssecond, sipType_TYPE, sipTransferObj)) == NULL) >+ { >+ Py_DECREF(l); >+ Py_DECREF(ptuple); >+ Py_DECREF(pfirst); >+ return NULL; >+ } >+ PyTuple_SET_ITEM(ptuple, 1, psecond); >+ >+ PyList_SET_ITEM(l, i, ptuple); >+ } >+ >+ return l; >+%End >+ >+%ConvertToTypeCode >+ const sipTypeDef* qpair_type = sipFindType("QPair<TYPE, TYPE>"); >+ >+ // Check the type if that is all that is required. >+ if (sipIsErr == NULL) >+ { >+ if (!PySequence_Check(sipPy)) >+ return 0; >+ >+ for (int i = 0; i < PySequence_Size(sipPy); ++i) >+ if (!sipCanConvertToType(PySequence_ITEM(sipPy, i), qpair_type, SIP_NOT_NONE)) >+ return 0; >+ >+ return 1; >+ } >+ >+ >+ QVector< QPair<TYPE, TYPE> > *qv = new QVector< QPair<TYPE, TYPE> >; >+ >+ for (int i = 0; i < PySequence_Size(sipPy); ++i) >+ { >+ int state; >+ QPair<TYPE, TYPE> * p = reinterpret_cast< QPair<TYPE, TYPE> * >(sipConvertToType(PySequence_ITEM(sipPy, i), qpair_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr)); >+ >+ if (*sipIsErr) >+ { >+ sipReleaseType(p, qpair_type, state); >+ delete qv; >+ return 0; >+ } >+ qv->append(*p); >+ sipReleaseType(p, qpair_type, state); >+ } >+ >+ *sipCppPtr = qv; >+ return sipGetState(sipTransferObj); >+%End >+ >+}; >+ > > /* kate: indent-width 4; space-indent on; hl c++; indent-mode cstyle; */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 813312
:
739515
|
739518
|
739521
|
739524
|
739527
|
739530
|
761120
|
767098
| 767099