Skip to content

Commit

Permalink
Fix false positive missing pyinit warning on arm64 macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Nov 9, 2021
1 parent d2ac352 commit 6422c29
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
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

0 comments on commit 6422c29

Please sign in to comment.