wayland support in wheels on Pypi
Sergio Callegari
sergio.callegari at gmail.com
Fri Feb 21 10:58:00 GMT 2025
On 21/02/2025 11:27, Phil Thompson wrote:
> Apologies for not being able to reply earlier.
Actually, it's me to thank you for looking into it and for the extended
answer!
> An updated PyQt5-Qt5
> wheel (build number 1) has been uploaded to the local PyPI server. If it
> fixes the problem then I'll move it to pypi.org.
I'd like to test, can you confirm the the local server is
"https://riverbankcomputing.com/pypi/simple/"? Do I need `--pre`?
> Answers to your questions are embedded below.
>
> No. pyqt-bundle is used to embed your copy of Qt in your copy of the
> PyQt5 wheels so that the PyQt5-Qt5 wheels on pypi.org are no longer
> used.
Tried using it just before receiving your mail, and realized it was not
the right tool.
> The PyQt5-Qt5 wheels are created with pyqt-qt-wheel which is also part
> of PyQt-builder but is undocumented.
In my experiment also found this. Unclear to me how to use: what is the
PACKAGE to be given on the command line?
>> 3) Alternatively, can I use the pyqt-bundle cli tool to build my own
>> pyqt5-qt5 wheel based on my system's qt5 that includes the wayland
>> plugin and use that to satisfy the dependencies of other packages?
>
> Yes. You'd have to take steps to ensure your version was used in
> preference to the pypi.org version.
With pyqt-qt-wheel, right? How is the preference expressed? Now, there
will probably be no need for it, given your new wheel, but it is always
good to learn...
Thanks!
Sergio
>>>
>>> On 17/02/2025 09:32, Charles wrote:
>>>
>>>> Just set QT_DEBUG_PLUGINS [1], check where it tries to load the
>>>> plugins, and if it is a wrong path, fix it using the methods in [2].
>>>>
>>>> As a python application it isn't always clear where the application
>>>> path is which is used to load the plugins.
>>>>
>>>> [1] https://doc.qt.io/qt-6/debug.html#environment-variables-
>>>> recognized-by-qt
>>>> [2] https://doc.qt.io/qt-6/deployment-plugins.html
>>>>
>>>> On Mon, Feb 17, 2025 at 3:07 PM Sergio Callegari
>>>> <sergio.callegari at gmail.com> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I have noticed a strange behavior from applications using PyQt5
>>>> and PyQt5-Qt5 (seen using the python IDE spyder).
>>>>
>>>> When I run spyder after having installed it from the packages
>>>> provided by my distribution (manjaro), spyder runs as a wayland
>>>> application on my system.
>>>>
>>>> However, if I install spyder using pip, uv, or pipx (namely
>>>> installation methods that rely on pre-built wheels from pypi),
>>>> then spyder cannot run anymore as a wayland application. From its
>>>> logs, I see that it cannot find the appropriate Qt plugin:
>>>>
>>>> Could not find the Qt platform plugin “wayland” in “”
>>>>
>>>> Now I wonder if there might be something missing in the pre-built
>>>> wheels of PyQt5 distributed on Pypi.
>>>>
>>>> Being able to have Qt applications working as wayland applications
>>>> could be beneficial on systems with two displays with different
>>>> resolutions, which is a setup not well supported by some
>>>> compositors with Xwayland.
>>>>
>>>> Thanks for the attention and your help,
>>>>
>>>> Sergio
>>>>
>>>>
>>>>
>>>
More information about the PyQt
mailing list