Skip to content

Commit

Permalink
include pyproject.toml in cargo metadata args
Browse files Browse the repository at this point in the history
Consider the cargo options merged from the pyproject.toml when
generating the cargo metadata.

This fixes the following problem: if pyo3 is an optional dependency
that is enabled through a feature declared in pyproject.toml, then
maturin will not detect pyo3 as binding.
  • Loading branch information
Daniel Estévez committed Jul 19, 2022
1 parent 5d10e3b commit 71f7825
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* Add 64-bit RISC-V support by felixonmars in [#1001](https://github.com/PyO3/maturin/pull/1001)
* Add support for invoking with `python3 -m maturin` in [#1008](https://github.com/PyO3/maturin/pull/1008)
* Fix detection of optional dependencies when declaring `features` in `pyproject.toml` in [#1014](https://github.com/PyO3/maturin/pull/1014)

## [0.13.0] - 2022-07-09

Expand Down
2 changes: 1 addition & 1 deletion src/build_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ impl BuildOptions {
Vec::new()
};

let cargo_metadata_extra_args = extract_cargo_metadata_args(&self.cargo)?;
let cargo_metadata_extra_args = extract_cargo_metadata_args(&cargo_options)?;

let result = MetadataCommand::new()
.manifest_path(&manifest_file)
Expand Down

0 comments on commit 71f7825

Please sign in to comment.