Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix generating pep517 sdist for src-layout #1288

Merged
merged 5 commits into from
Nov 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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