Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a recipe for orjson #3001

Open
krolaper opened this issue Apr 5, 2024 · 3 comments
Open

Add a recipe for orjson #3001

krolaper opened this issue Apr 5, 2024 · 3 comments

Comments

@krolaper
Copy link

krolaper commented Apr 5, 2024

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)
@T-Dynamos
Copy link
Contributor

It's a rust-based package. Please take reference from pydantic-core's recipe and make for orjson.

@krolaper
Copy link
Author

krolaper commented Apr 6, 2024

@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()

@T-Dynamos
Copy link
Contributor

@krolaper Please do a clean build after making recipe. Maybe your recipe wasn't built.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants