Skip to content

Commit

Permalink
Create out dir before writing sdist to it
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin committed Jun 25, 2019
1 parent e7a6a09 commit 027c33e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/build_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ impl BuildContext {

/// Builds a source distribution and returns the same metadata as [BuildContext::build_wheels]
pub fn build_source_distribution(&self) -> Result<Option<BuiltWheelMetadata>, Error> {
fs::create_dir_all(&self.out)
.context("Failed to create the target directory for the source distribution")?;

if get_pyproject_toml(self.manifest_path.parent().unwrap()).is_ok() {
let sdist_path = source_distribution(&self.out, &self.metadata21, &self.manifest_path)
.context("Failed to build source distribution")?;
Expand Down

0 comments on commit 027c33e

Please sign in to comment.