如何编译和运行 pyqtdeploy 的预打包演示应用程序?

如何编译和运行 pyqtdeploy 的预打包演示应用程序?

从 sysroot 编译 openssl 无法找到 stdlib(在 android 上运行 pyqtdeploy 的 PyQT5 演示时)

如何确保可以找到标准库?

在尝试使用 PyQT 制作 Python Android 应用程序时,pyqtdeploy似乎是支持 Python3 和 PyQT5 的官方工具(buildozer 似乎不支持)

但是,它的文档有限。虽然提供了演示,但缺少 APK 构建步骤。我已成功开始编译,但出现查找标准库的错误,尽管我已经build-essentials安装libc6-dev了。

解压最新的 pyqtdeploy demo源代码下载网站并下载一些额外的依赖项:

cd pyqtdeploy-2.1/demo
cd src
wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tar.xz
wget http://mirrors.ocf.berkeley.edu/qt/archive/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.tar.xz
wget http://mirrors.ocf.berkeley.edu/qt/archive/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.tar.xz
wget https://superb-sea2.dl.sourceforge.net/project/pyqt/sip/sip-4.19.12/sip-4.19.12.tar.gz
cd -

然后我跑

ANDROID_NDK_TOOLCHAIN_VERSION=4.9 ANDROID_NDK_PLATFORM=android-28 ANDROID_NDK_ROOT=~/Android/android-ndk-r17b python3  build-demo.py --target android-32

编译了一会儿然后失败了:


generating dummy tests (if needed)...
make[1]: Entering directory '/home/jonny/Projects/organic-mail/tools/pyqtdeploy-2.1/demo/sysroot-android-32/build/openssl-1.0.2p/test'
ideatest.c => dummytest.c
md2test.c => dummytest.c
rc5test.c => dummytest.c
mdc2test.c => dummytest.c
jpaketest.c => dummytest.c
make[1]: Leaving directory '/home/jonny/Projects/organic-mail/tools/pyqtdeploy-2.1/demo/sysroot-android-32/build/openssl-1.0.2p/test'

Configured for android.

*** Because of configuration changes, you MUST do the following before
*** building:

    make depend
making depend in crypto...
make[1]: Entering directory '/home/jonny/Projects/organic-mail/tools/pyqtdeploy-2.1/demo/sysroot-android-32/build/openssl-1.0.2p/crypto'
In file included from cryptlib.c:117:0:
cryptlib.h:62:21: fatal error: stdlib.h: No such file or directory
 # include <stdlib.h>

啊哈,这可能有关系:sysroot-android-32/include目录是空的。pyqtdeploy-sysroot 工具应该为每个目标平台创建一个 sysroot

当我忽略构建 openssl 时,我收到 SIP 错误:'/usr/lib/python3/dist-packages/libsip.a': No such file

相关内容