Skip to content

Commit

Permalink
Support cross compile to different operating systems
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Nov 15, 2021
1 parent 18b68ad commit 92075f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Fix false positive missing pyinit warning on arm64 macOS in [#673](https://github.com/PyO3/maturin/pull/673)
* Build without rustls on arm64 Windows by nsait-linaro in [#674](https://github.com/PyO3/maturin/pull/674)
* Publish Windows arm64 wheels to PyPI by nsait-linaro in [#675](https://github.com/PyO3/maturin/pull/675)
* Add support for cross compiling to different operating systems in [#680](https://github.com/PyO3/maturin/pull/680)

## [0.11.5] - 2021-10-13

Expand Down
6 changes: 5 additions & 1 deletion src/python_interpreter.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::auditwheel::PlatformTag;
use crate::cross_compile::is_cross_compiling;
use crate::{BridgeModel, Target};
use anyhow::{bail, format_err, Context, Result};
use regex::Regex;
Expand Down Expand Up @@ -299,7 +300,10 @@ fn fun_with_abiflags(
target: &Target,
bridge: &BridgeModel,
) -> Result<String> {
if bridge != &BridgeModel::Cffi && target.get_python_os() != message.platform {
if bridge != &BridgeModel::Cffi
&& target.get_python_os() != message.platform
&& !is_cross_compiling(target)?
{
bail!(
"sys.platform in python, {}, and the rust target, {:?}, don't match ಠ_ಠ",
message.platform,
Expand Down

0 comments on commit 92075f9

Please sign in to comment.