-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
Better cross compiling support for PyO3 binding on Unix #454
Conversation
The |
41845d5
to
fce0f3d
Compare
src/build_options.rs
Outdated
@@ -469,6 +514,39 @@ fn split_extra_args(given_args: &[String]) -> Result<Vec<String>> { | |||
Ok(splitted_args) | |||
} | |||
|
|||
fn is_cross_compiling(target: &Target) -> Result<bool> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function diverges a lot from the pyo3 version because it's not used in build script and have no access to some build time environment variables.
6373e84
to
55a45dd
Compare
Interesting question. I'd been looking at refactoring pyo3's configuration into a shared crate previously, though I hadn't quite finished up a design. I can try to push what I have at some point over the next week. |
Btw I haven't forgotten about this - what I was thinking of above is what I've described on PyO3/pyo3#1548 My branch that I was originally trying out is now a bit outdated because there have been a lot of improvements to the pyO3 build.rs recently. If you think what I propose in that issue is useful here then I'm happy to remake it. |
Should I review this or should I wait for changes in pyo3? |
I think we can push this to finish line without waiting for changes in pyo3, it just means some duplicated code between maturin and pyo3, we can refactor it later and maybe extract a shared crate out of them. |
Please move the bulk of the cross compiling logic to a new |
https://build.opensuse.org/request/show/894986 by user mia + dimstar_suse - Update to 0.10.6 * Fix build with the “upload” feature disabled by ravenexp gh#PyO3/maturin#548 - Changes in 0.10.5: * Add manylinux_2_27 support gh#PyO3/maturin#521 * Add support for Windows arm64 target gh#PyO3/maturin#524 * Always output PEP 600 platform tags gh#PyO3/maturin#525 * Fix missing PyInit_<module_name> warning with Rust submodule gh#PyO3/maturin#528 * Better cross compiling support for PyO3 binding on Unix gh#PyO3/maturin#454 * Fix s390x architecture support gh#PyO3/maturin#530 * Fix auditwheel panic with s390x wheels gh#PyO3/maturin#532 * Support uploading heterogenous wheels by ravenexp gh#PyO3/maturin#544 * Warn about pyproject.toml missing maturin version constraint gh#PyO3/maturin#545
Fixes #446
I've tested it in https://github.com/messense/manylinux2014-cross-arm/actions/runs/605207408 and verified the built wheels with Docker.