HAP-python icon indicating copy to clipboard operation
HAP-python copied to clipboard

Orjson, requires a 64-bit Python with>3.8.5+and<3.9

Open fwebcc opened this issue 2 years ago • 16 comments

Orjson, requires a 64-bit Python with>3.8.5+and<3.9 Cannot be used on embedded devices such as routers and some ARM devices You can remove this library and use Json directly?

fwebcc avatar Apr 26 '23 14:04 fwebcc

Json is too slow to meet iOS 16 requirements

orjson builds just fine on 32bit. Home assistant is using it.

bdraco avatar Apr 26 '23 15:04 bdraco

There are 32 bit wheels at:

https://pypi.org/project/orjson/#files And musl ones here https://wheels.home-assistant.io/musllinux/

bdraco avatar Apr 26 '23 15:04 bdraco

Thank you for your reply. I have tried, but I am using Asus88u CPU with armhf architecture, which unfortunately does not support it. They only support armv7 and armv6

fwebcc avatar Apr 26 '23 23:04 fwebcc

armhf can mean different things depending on the os vendor. If its ARMv6 + musl you can use https://wheels.home-assistant.io/musllinux/orjson-3.8.10-cp311-cp311-musllinux_1_2_armv6l.whl

bdraco avatar Apr 27 '23 00:04 bdraco

loog@RT-AC88U-2C70:/tmp/mnt/fwebcc/tmp# pip3 install orjson-3.8.10-cp311-cp311-musllinux_1_2_armv6l.whl ERROR: orjson-3.8.10-cp311-cp311-musllinux_1_2_armv6l.whl is not a supported wheel on this platform.

fwebcc avatar Apr 27 '23 00:04 fwebcc

Are you using glibc?

bdraco avatar Apr 27 '23 00:04 bdraco

That wheel is for musl + python 3.11

bdraco avatar Apr 27 '23 00:04 bdraco

for python 3.10 https://wheels.home-assistant.io/musllinux/orjson-3.8.10-cp310-cp310-musllinux_1_2_armv6l.whl

bdraco avatar Apr 27 '23 00:04 bdraco

Thank you. I'll try upgrading to Python 3.10 later now python3.9

fwebcc avatar Apr 27 '23 00:04 fwebcc

libc-2.23.so

fwebcc avatar Apr 27 '23 00:04 fwebcc

You need glibc wheels. It doesn't look like anyone is already building thoose

You can fork orjson and add whatever qemu arch you want here https://github.com/ijl/orjson/blob/c2514ab9ecdb9d42945f3fc6e18475b88bef8ec2/.github/workflows/linux.yaml#L213

And than use github actions to build them or send them a PR

bdraco avatar Apr 27 '23 00:04 bdraco

https://wheels.home-assistant.io/alpine-3.14/armhf/HAP_python-4.4.0-py3-none-any.whl It can run

fwebcc avatar Apr 27 '23 00:04 fwebcc

I opened a test PR to see if armv6 can be built that way as well https://github.com/bdraco/orjson/pull/1 It will take a few hours to get a result

bdraco avatar Apr 27 '23 00:04 bdraco