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

Document the rust toolchain requirement for source installs and build MUSL wheels #6

Closed
p1c2u opened this issue Jun 15, 2023 · 9 comments

Comments

@p1c2u
Copy link

p1c2u commented Jun 15, 2023

Would be nice to have an instruction with pre-requisites and what is the recommended way of installation.

I tried to install it inside docker with image python:3.11-alpine

#6 4.061   Downloading rpds_py-0.7.1.tar.gz (15 kB)
#6 4.071   Installing build dependencies: started
#6 5.599   Installing build dependencies: finished with status 'done'
#6 5.601   Getting requirements to build wheel: started
#6 5.684   Getting requirements to build wheel: finished with status 'done'
#6 5.686   Preparing metadata (pyproject.toml): started
#6 5.755   Preparing metadata (pyproject.toml): finished with status 'error'
#6 5.761   error: subprocess-exited-with-error
#6 5.761   
#6 5.761   × Preparing metadata (pyproject.toml) did not run successfully.
#6 5.761   │ exit code: 1
#6 5.761   ╰─> [6 lines of output]
#6 5.761       
#6 5.761       Cargo, the Rust package manager, is not installed or is not on PATH.
#6 5.761       This package requires Rust and Cargo to compile extensions. Install it through
#6 5.761       the system's package manager or via https://rustup.rs/
#6 5.761       
#6 5.761       Checking for Rust toolchain....
#6 5.761       [end of output]
#6 5.761   
#6 5.761   note: This error originates from a subprocess, and is likely not a problem with pip.
#6 5.764 error: metadata-generation-failed
#6 5.764 
#6 5.764 × Encountered error while generating package metadata.
#6 5.764 ╰─> See above for output.
#6 5.764 
#6 5.764 note: This is an issue with the package mentioned above, not pip.
#6 5.764 hint: See above for details.
@Julian
Copy link
Member

Julian commented Jun 15, 2023

(Definitely! Thanks for the issue.)

For what it's worth, that error means your container is missing the Rust toolchain.

An example of what you need is here.

Please share any additional feedback!

@Julian
Copy link
Member

Julian commented Jun 15, 2023

Another thing by the way (which I meant to leave myself as an issue) is that I haven't spent any time trying to understand why Docker (even for me) isn't happy with one of the wheels being uploaded -- @ofek in case you happen to know and don't mind the ping...

Otherwise yeah I'd like to remove the need for ^^ at some point by building some additional wheels if possible.

@p1c2u
Copy link
Author

p1c2u commented Jun 15, 2023

Thanks, it worked.

I believe PEP standard for wheels doesn't support musl libc implementation (Alpine Linux); APK package is the only way to handle Alpine Linux so far?

@ofek
Copy link

ofek commented Jun 15, 2023

There is no wheel for MUSL, they should look like this https://pypi.org/project/hatch-showcase/#files

@Julian
Copy link
Member

Julian commented Jun 17, 2023

Aha, ok, maturin is automatically building all the wheels, I haven't configured it at all, but will have to have a look to see if there's a setting I can tweak to make it also build ones for MUSL then.

@Julian Julian changed the title Pre-requisites and Installation instructions missing Document the rust toolchain requirement for source installs and build MUSL wheels Jul 6, 2023
@jonaslb
Copy link

jonaslb commented Jul 6, 2023

For context, there was a question on maturin action issue tracker about musllinux here: PyO3/maturin-action#56

Which ended with a supposedly working release step with maturin for musllinux here: https://github.com/pluots/stringmetrics/blob/main/.github/workflows/release-python.yaml

I can maybe do some experimentation to try to get it to work also here later, but please anyone pick it up asap if at all possible - don't wait for me :)

@Julian
Copy link
Member

Julian commented Jul 6, 2023

This should now be addressed by some more wheels built in 0.8.6 for MUSL.

I'm going to leave this open for another few hours to address the other piece here (mentioning the need for Rust toolchain when building from source on some other platform) but in the meantime if someone can confirm that fixes this it'd be helpful.

@Julian
Copy link
Member

Julian commented Jul 6, 2023

Looks like maybe there's one more to build for aarch64 as well (will try momentarily).

@Julian Julian closed this as completed in 585dad6 Jul 6, 2023
@Julian
Copy link
Member

Julian commented Jul 6, 2023

OK, I've now added a note to the README, and also confirmed that for me here locally I get a wheel even within a container image.

If anyone has additional platforms they expect wheels to be easily buildable for, a PR is always welcome.

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

4 participants