Need some help with pyqtdelpoy, some assistance would be appreciated
Phil Thompson
phil at riverbankcomputing.com
Sun Oct 22 22:02:35 BST 2023
On 22/10/2023 21:54, Kwadwo Yeboah wrote:
> System Info:
> OS: Ubuntu Server with Xubuntu desktop using lightdm running in
> VirtualBox
> Distributor ID: Ubuntu
> Description: Ubuntu 22.04.3 LTS
> Release: 22.04
> Codename: jammy
> Pyqtdeploy == 3.3.0
>
> I need audio for my app. I'm having trouble importing packages other
> than
> the standard packages. Building the sysroot and building the demo is
> fine
> for linux-64 and android-64, with the original package list.
> The problem is that I cannot seem to import pyglet (the module I need
> in
> order to play audio, (absolute imports found with findimports module
> from
> pypi). I searched the site-packages of the sysroot and the package is
> present at
> sysroot-android-64/lib/python3.11/site-packages/pyglet.
> 1. Is it possible to use other packages?
> 2. Also can there be support for adding ctypes to the standard library
> package?
>
> Workaround:
> 1. Placing pyglet in the Application Package Directory.
> 2. Using a shared object generated with nuitka, added with qmake
> variable
> ANDROID_EXTRA_LIBS -- then load library the python module using ctypes.
> from ctypes import cdll
>
> mylib = cdll.LoadLibrary('./pyglet.so')
ctypes is supported for the standard desktop platforms. I don't know
what's involved with supporting it on Android - it may just work. You
could try playing with it by making changes to standard_library.py that
is part of the Python sysroot plugin.
Phil
More information about the PyQt
mailing list