diff --git a/src/build_context.rs b/src/build_context.rs index 788f4b070..8e92d38cc 100644 --- a/src/build_context.rs +++ b/src/build_context.rs @@ -81,7 +81,7 @@ pub struct BuildContext { pub bridge: BridgeModel, /// Whether this project is pure rust or rust mixed with python pub project_layout: ProjectLayout, - /// Parsed project.toml if any + /// Parsed pyproject.toml if any pub pyproject_toml: Option, /// Python Package Metadata 2.1 pub metadata21: Metadata21, diff --git a/src/main.rs b/src/main.rs index 816116c2d..f73b75a3b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -302,7 +302,7 @@ fn pep517(subcommand: Pep517Command) -> Result<()> { let build_context = build_options.into_build_context(false, false, false)?; let (path, _) = build_context .build_source_distribution()? - .context("Failed to build source distribution")?; + .context("Failed to build source distribution, pyproject.toml not found")?; println!("{}", path.file_name().unwrap().to_str().unwrap()); } }; @@ -325,7 +325,9 @@ fn run() -> Result<()> { } => { let build_context = build.into_build_context(release, strip, false)?; if sdist { - build_context.build_source_distribution()?; + build_context + .build_source_distribution()? + .context("Failed to build source distribution, pyproject.toml not found")?; } let wheels = build_context.build_wheels()?; assert!(!wheels.is_empty()); @@ -406,7 +408,7 @@ fn run() -> Result<()> { let build_context = build_options.into_build_context(false, false, false)?; build_context .build_source_distribution()? - .context("Failed to build source distribution")?; + .context("Failed to build source distribution, pyproject.toml not found")?; } Opt::Pep517(subcommand) => pep517(subcommand)?, Opt::InitProject { path, options } => init_project(path, options)?,