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

Fix false positive missing pyinit warning on arm64 macOS #673

Merged
merged 1 commit into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Refactor `develop` command to act identical to PEP 660 editable wheels in [#653](https://github.com/PyO3/maturin/pull/653)
* Upgrade to Rust 2021 edition in [#655](https://github.com/PyO3/maturin/pull/655)
* Add support for powerpc64 and powerpc64le on FreeBSD by pkubaj in [#656](https://github.com/PyO3/maturin/pull/656)
* Fix false positive missing pyinit warning on arm64 macOS in [#673](https://github.com/PyO3/maturin/pull/673)

## [0.11.5] - 2021-10-13

Expand Down
9 changes: 9 additions & 0 deletions src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,15 @@ pub fn warn_missing_py_init(artifact: &Path, module_name: &str) -> Result<()> {
break;
}
}
if !found {
for sym in macho.symbols() {
let (sym_name, _) = sym?;
if py_init == sym_name.strip_prefix('_').unwrap_or(sym_name) {
found = true;
break;
}
}
}
}
goblin::mach::Mach::Fat(_) => {
// Ignore fat macho,
Expand Down