Skip to content

Commit

Permalink
Merge #1284
Browse files Browse the repository at this point in the history
1284: Update cargo_metadata to 0.15.2 r=messense a=messense



Co-authored-by: messense <[email protected]>
  • Loading branch information
bors[bot] and messense authored Nov 22, 2022
2 parents 82d584b + cf92465 commit ed2c757
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 48 deletions.
38 changes: 24 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ name = "maturin"
anyhow = "1.0.63"
base64 = "0.13.0"
glob = "0.3.0"
# cargo_metadata 0.15.1 breaks `maturin build` on Rust 1.48.0
# see https://github.com/oli-obk/cargo_metadata/issues/212
cargo_metadata = "=0.15.0"
cargo_metadata = "0.15.2"
cargo-options = "0.5.2"
cargo-zigbuild = "0.14.1"
cargo-xwin = { version = "0.12.2", default-features = false }
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ mod develop;
mod metadata;
mod module_writer;
mod new_project;
mod polyfill;
mod project_layout;
pub mod pyproject_toml;
mod python_interpreter;
Expand Down
26 changes: 0 additions & 26 deletions src/polyfill.rs

This file was deleted.

4 changes: 2 additions & 2 deletions src/project_layout.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::build_options::{extract_cargo_metadata_args, CargoOptions};
use crate::polyfill::MetadataCommandExt;
use crate::{CargoToml, Metadata21, PyProjectToml};
use anyhow::{bail, format_err, Context, Result};
use cargo_metadata::{Metadata, MetadataCommand};
Expand Down Expand Up @@ -307,8 +306,9 @@ impl ProjectResolver {
let cargo_metadata_extra_args = extract_cargo_metadata_args(cargo_options)?;
let result = MetadataCommand::new()
.manifest_path(manifest_path)
.verbose(true)
.other_options(cargo_metadata_extra_args)
.exec_inherit_stderr();
.exec();

let cargo_metadata = match result {
Ok(cargo_metadata) => cargo_metadata,
Expand Down
4 changes: 2 additions & 2 deletions src/source_distribution.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::module_writer::{add_data, ModuleWriter};
use crate::polyfill::MetadataCommandExt;
use crate::{pyproject_toml::Format, BuildContext, PyProjectToml, SDistWriter};
use anyhow::{bail, Context, Result};
use cargo_metadata::{Metadata, MetadataCommand};
Expand Down Expand Up @@ -467,9 +466,10 @@ pub fn source_distribution(
// thus we need to find out its workspace root from `cargo metadata`
let path_dep_metadata = MetadataCommand::new()
.manifest_path(path_dep)
.verbose(true)
// We don't need to resolve the dependency graph
.no_deps()
.exec_inherit_stderr()
.exec()
.with_context(|| {
format!(
"Cargo metadata failed for {} at '{}'",
Expand Down

0 comments on commit ed2c757

Please sign in to comment.