python-for-android
python-for-android copied to clipboard
Add a recipe for `orjson`
Versions
Python: 3.10.12
OS: Linux mint 21.3
Kivy: 2.2.1
Cython: 0.29.33
OpenJDK: 17
Description
How to use orjson library in buildozer?
After packaging and running the application:
ImportError: dlopen failed: "/data/data/codeberg.org.aigodosint/files/app/_python_bundle/site-packages/orjson/orjson.so" is for EM_X86_64 (62) instead of EM_AARCH64 (183)
It's a rust-based package. Please take reference from pydantic-core's recipe and make for orjson.
@T-Dynamos I tried it and it didn't help (same error). (repeated the init file, replacing the data with orjson).
from pythonforandroid.recipe import RustCompiledComponentsRecipe
class OrjsonRecipe(RustCompiledComponentsRecipe):
version = "3.10.0"
url = "https://github.com/ijl/orjson/archive/refs/tags/{version}.tar.gz"
use_maturin = True
hostpython_prerequisites = ["typing_extensions"]
site_packages_name = "orjson"
recipe = PydanticcoreRecipe()
@krolaper Please do a clean build after making recipe. Maybe your recipe wasn't built.