Skip to content

Commit

Permalink
Merge #1288
Browse files Browse the repository at this point in the history
1288: Fix generating pep517 sdist for src-layout r=messense a=messense

Fixes #1285 

Co-authored-by: messense <[email protected]>
  • Loading branch information
bors[bot] and messense authored Nov 23, 2022
2 parents a0ac5cc + 353b33b commit 41edf7b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
RUST_BACKTRACE: '1'
CARGO_INCREMENTAL: '0'
CARGO_TERM_COLOR: always
container: alpine:edge
container: alpine:latest
steps:
- uses: actions/checkout@v3
- name: Install build requirements
Expand Down
16 changes: 8 additions & 8 deletions Cargo.lock

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

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]

* Tighten src-layout detection logic in [#1281](https://github.com/PyO3/maturin/pull/1282)
* Fix generating pep517 sdist for src-layout in [#1288](https://github.com/PyO3/maturin/pull/1288)

## [0.14.1] - 2022-11-20

Expand Down
4 changes: 2 additions & 2 deletions src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::io::{BufReader, Read};
use std::path::{Path, PathBuf};
use std::process::Stdio;
use std::str;
use tracing::debug;
use tracing::{debug, trace};

/// The first version of pyo3 that supports building Windows abi3 wheel
/// without `PYO3_NO_PYTHON` environment variable
Expand Down Expand Up @@ -425,7 +425,7 @@ fn compile_target(
.expect("Cargo build should have a stdout");
for message in cargo_metadata::Message::parse_stream(BufReader::new(stream)) {
let message = message.context("Failed to parse cargo metadata message")?;
debug!("cargo message: {:?}", message);
trace!("cargo message: {:?}", message);
match message {
cargo_metadata::Message::CompilerArtifact(artifact) => {
let package_in_metadata = context
Expand Down
11 changes: 3 additions & 8 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,9 @@ enum Pep517Command {
/// The sdist_directory argument to build_sdist
#[arg(long = "sdist-directory")]
sdist_directory: PathBuf,
#[arg(
short = 'm',
long = "manifest-path",
default_value = "Cargo.toml",
value_name = "PATH"
)]
#[arg(short = 'm', long = "manifest-path", value_name = "PATH")]
/// The path to the Cargo.toml
manifest_path: PathBuf,
manifest_path: Option<PathBuf>,
},
}

Expand Down Expand Up @@ -292,7 +287,7 @@ fn pep517(subcommand: Pep517Command) -> Result<()> {
let build_options = BuildOptions {
out: Some(sdist_directory),
cargo: CargoOptions {
manifest_path: Some(manifest_path),
manifest_path,
..Default::default()
},
..Default::default()
Expand Down

0 comments on commit 41edf7b

Please sign in to comment.