laz-rs / laz-rs-python

Python bindings for laz-rs
MIT License
10 stars 4 forks source link

Support for ARM64 #9

Closed nejcd closed 2 years ago

nejcd commented 2 years ago

Hi,

I am trying to pip install your package inside the latest Python docker container running on ARM64 running on Apple Silicone M1.

And I am getting the following error:

root@5eca8d321db9:/# pip install lazrs ERROR: Could not find a version that satisfies the requirement lazrs (from versions: none) ERROR: No matching distribution found for lazrs

Probably just need to specify one more target when building the package? Or is it not that simple? Would you be able to help?

Best, Nejc

tmontaigu commented 2 years ago

That's because the Pypi repo does not have wheels for arm64.

I pushed arm64 wheels for python 3.9 & 3.10 on macos but for linux I can't provide them yet (and github CI does not have narive arm64 linux/macos so I cant use it to create the wheels like I do for x86).

So you'll need to build them yourself if you want to use laz-rs on linux arm64. It should be easy tho,

  1. Install rust
  2. git clone https://github.com/laz-rs/laz-rs-python
  3. cd laz-rs-python
  4. pip install maturin
  5. maturin build --release
  6. pip install target/{name-of-the-wheel}

or maturin develop --release directly

hugoledoux commented 2 years ago

pypi can have arm64 wheels! See my project: https://pypi.org/project/startinpy/#files

I build it with this: https://github.com/hugoledoux/startinpy/blob/master/.github/workflows/build.yml#L36

tmontaigu commented 2 years ago

Ah yes since we don't have any weird dependencies, cross compiling with rust is easy. Thanks for the examples

nejcd commented 2 years ago

Thanks for the fast response.

I have added it to my Dockerfile and built it and it works as it should. Thanks!

If you will someday add it to pypi it would be most appreciated.

Cheers, N