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


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

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

Path csiph.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!bofh.it!news.nic.it!robomod
From Julian Gilbey <julian@d-and-j.net>
Newsgroups linux.debian.maint.python
Subject PyQt5 question: why are QOpenGLTimeMonitor/QOpenGLTimerQuery not defined on armhf?
Date Thu, 07 Apr 2022 10:30:02 +0200
Message-ID <E9vGG-74hv-9@gated-at.bofh.it> (permalink)
X-Original-To Debian Python list <debian-python@lists.debian.org>
X-Mailbox-Line From debian-python-request@lists.debian.org Thu Apr 7 08:26:18 2022
Old-Return-Path <julian@d-and-j.net>
X-Amavis-Spam-Status No, score=-7.21 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, LDO_WHITELIST=-5, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
X-Policyd-Weight using cached result; rate: -4.6
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
X-Mailing-List <debian-python@lists.debian.org> archive/latest/19870
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/Yk6gGhRhd9QSFdBL@d-and-j.net
Approved robomod@news.nic.it
Lines 52
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Thu, 7 Apr 2022 09:26:02 +0100
X-Original-Message-ID <Yk6gGhRhd9QSFdBL@d-and-j.net>
Xref csiph.com linux.debian.maint.python:14048

Show key headers only | View raw


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

Back to linux.debian.maint.python | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web