Skip to content

Commit

Permalink
Merge pull request #1150 from messense/filter-target-kind
Browse files Browse the repository at this point in the history
Filter out unwanted Cargo target kinds when determine bridge model
  • Loading branch information
messense authored Sep 29, 2022
2 parents 0d0d8c4 + dc2b211 commit 96bac48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

* Fix `maturin develop` in Windows conda virtual environment in [#1146](https://github.com/PyO3/maturin/pull/1146)
* Fix build for crate using `pyo3` and `build.rs` without `cdylib` crate type in [#1150](https://github.com/PyO3/maturin/pull/1150)

## [0.13.5] - 2022-09-27

Expand Down
5 changes: 5 additions & 0 deletions src/build_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,11 @@ pub fn find_bridge(cargo_metadata: &Metadata, bridge: Option<&str>) -> Result<Br
let targets: Vec<_> = root_package
.targets
.iter()
.filter(|target| {
target.kind.iter().any(|kind| {
kind != "example" && kind != "test" && kind != "bench" && kind != "custom-build"
})
})
.flat_map(|target| target.crate_types.iter())
.map(String::as_str)
.collect();
Expand Down

0 comments on commit 96bac48

Please sign in to comment.