Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #14048 > unrolled thread

PyQt5 question: why are QOpenGLTimeMonitor/QOpenGLTimerQuery not defined on armhf?

Started byJulian Gilbey <julian@d-and-j.net>
First post2022-04-07 10:30 +0200
Last post2022-04-07 10:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.debian.maint.python


Contents

  PyQt5 question: why are QOpenGLTimeMonitor/QOpenGLTimerQuery not  defined on armhf? Julian Gilbey <julian@d-and-j.net> - 2022-04-07 10:30 +0200

#14048 — PyQt5 question: why are QOpenGLTimeMonitor/QOpenGLTimerQuery not defined on armhf?

FromJulian Gilbey <julian@d-and-j.net>
Date2022-04-07 10:30 +0200
SubjectPyQt5 question: why are QOpenGLTimeMonitor/QOpenGLTimerQuery not defined on armhf?
Message-ID<E9vGG-74hv-9@gated-at.bofh.it>
Well, the new version of qtpy failed the CI checks on armhf, and I
don't understand why.  The cause is that the following caused an
error:

(sid_armhf-dchroot)jdg@abel:~$ python3
Python 3.10.4 (main, Apr  2 2022, 09:04:19) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5.QtGui import QOpenGLTimeMonitor
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'QOpenGLTimeMonitor' from 'PyQt5.QtGui' (/usr/lib/python3/dist-packages/PyQt5/QtGui.abi3.so)
>>> from PyQt5.QtGui import QOpenGLTimerQuery
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'QOpenGLTimerQuery' from 'PyQt5.QtGui' (/usr/lib/python3/dist-packages/PyQt5/QtGui.abi3.so)

Why are these two classes not defined on armhf?  I had a quick look at
the source code for PyQt5, and I see the following:

sip/QtGui/qopengltimerquery.sip, lines 23-:
%If (Qt_5_1_0 -)
%If (PyQt_Desktop_OpenGL)

class QOpenGLTimerQuery : QObject
{
%TypeHeaderCode
#include <qopengltimerquery.h>
%End
[...]

So I presume that if PyQt_Desktop_OpenGL is defined, then this is
included.  This would be set in config-tests/cfgtest_QtGui.cpp, lines
28-:

#if defined(QT_NO_OPENGL)
    out << "PyQt_OpenGL\n";
    out << "PyQt_Desktop_OpenGL\n";
#elif defined(QT_OPENGL_ES) || defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_ES_3)
    out << "PyQt_Desktop_OpenGL\n";
#endif

But nowhere do I find any of QT_NO_OPENGL or QT_OPENGL_ES* defined in
the package (but then maybe I'm not looking in the right place?  So I
don't know why these two classes are included in the amd64 version of
the package but not the armhf version.

I could just protect the two imports with a try/except block, but I
would like to know that this is the right thing to do first!

Thanks,

   Julian

[toc] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web