Qiskit / rustworkx

A high performance Python graph library implemented in Rust.
https://www.rustworkx.org
Apache License 2.0
1.04k stars 145 forks source link

Binaries for alpine linux ? #992

Closed nvuillam closed 11 months ago

nvuillam commented 11 months ago

What is the expected enhancement?

Hi, MegaLinter uses checkov that relies on rustwork, so to install checkov we need rust compiler, and it takes like forever during docker builds :)

Would it be possible to provide pre-compiled binaries for alpine linux ?

Many thanks & best regards :)

Issue on checkov repo : https://github.com/bridgecrewio/checkov/issues/5608#issue-1921018076

IvanIsCoding commented 11 months ago

This should be possible. We are working on releasing 0.13.2 today to support Python 3.12, but after that we should be able to add musl support.

PyO3 supports it and so does cibuildwheel. We haven't tested the code so support would be Tier 3, but adding a CI job seems reasonable

nvuillam commented 11 months ago

@IvanIsCoding many thanks :)

mtreinish commented 11 months ago

I think we probably will want to combine this with #891 for 0.14.0. If we add musl builds for linux we'll be shipping a huge number of wheels for each release, using abi3 wheels will shrink that down quite a bit.

IvanIsCoding commented 11 months ago

I think we probably will want to combine this with #891 for 0.14.0. If we add musl builds for linux we'll be shipping a huge number of wheels for each release, using abi3 wheels will shrink that down quite a bit.

I'll try to trigger a musl job with cibuildwheel. The fact that @nvuillam reported he was able to install makes me think we are able to compile against this architecture

IvanIsCoding commented 11 months ago

While I was triggering the job, I noticed one possible issue:

Building wheels for collected packages: numpy
    Building wheel for numpy (pyproject.toml): started
    Building wheel for numpy (pyproject.toml): still running...
    Building wheel for numpy (pyproject.toml): still running...

It seems NumPy only has binaries for musllinux after 1.25+. This is not an issue for Python 3.9+, but you should still be careful with 3.8 and 3.7 because you might end up compiling NumPy

IvanIsCoding commented 11 months ago

We have musllinux wheels now: https://pypi.org/project/rustworkx/0.13.2/#files 🥳

nvuillam commented 11 months ago

Great, I'll try that in a next MegaLinter patch, many many thanks for your reactivity :)

tuananh commented 10 months ago

We have musllinux wheels now: https://pypi.org/project/rustworkx/0.13.2/#files 🥳

can we have musl-aarch64 as well?

our use case: checkov on aarch64

IvanIsCoding commented 10 months ago

We have musllinux wheels now: https://pypi.org/project/rustworkx/0.13.2/#files 🥳

can we have musl-aarch64 as well?

our use case: checkov on aarch64

I answered you on the other issue but: yes, we can try to publish a wheel for aarch64 for 0.13.2

tuananh commented 10 months ago

We have musllinux wheels now: https://pypi.org/project/rustworkx/0.13.2/#files 🥳

can we have musl-aarch64 as well? our use case: checkov on aarch64

I answered you on the other issue but: yes, we can try to publish a wheel for aarch64 for 0.13.2

Many thanks. Looking forward to it.

IvanIsCoding commented 10 months ago

We have musllinux wheels now: https://pypi.org/project/rustworkx/0.13.2/#files 🥳

can we have musl-aarch64 as well? our use case: checkov on aarch64

I answered you on the other issue but: yes, we can try to publish a wheel for aarch64 for 0.13.2

Many thanks. Looking forward to it.

We'll hold back publishing the wheels because we are moving our build system to use PyPI trusted publisher. You should see aarch64 musl wheels for 0.14.0 which will come up in a couple weeks.

In the mean time, you'll need to install a Rust compiler. Fortunately, rustup makes that simple. I myself had never used Alpine linux and manage to install the toolchain