ikalchev / HAP-python

A python implementation of the HomeKit Accessory Protocol (HAP)
Other
607 stars 116 forks source link

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

Open fwebcc opened 1 year ago

fwebcc commented 1 year ago

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?

bdraco commented 1 year ago

Json is too slow to meet iOS 16 requirements

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

bdraco commented 1 year ago

There are 32 bit wheels at:

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

fwebcc commented 1 year ago

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

bdraco commented 1 year ago

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

fwebcc commented 1 year ago

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.

bdraco commented 1 year ago

Are you using glibc?

bdraco commented 1 year ago

That wheel is for musl + python 3.11

bdraco commented 1 year ago

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

fwebcc commented 1 year ago

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

fwebcc commented 1 year ago

libc-2.23.so

bdraco commented 1 year ago

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

fwebcc commented 1 year ago

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

bdraco commented 1 year ago

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