Skip to content

Commit

Permalink
Filter out unwanted Cargo target kinds when determine bridge model
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Sep 29, 2022
1 parent 0d0d8c4 commit dc2b211
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 dc2b211

Please sign in to comment.