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

Filter Cargo.toml.orig from sdist #271

Merged
merged 1 commit into from
Mar 6, 2020
Merged

Filter Cargo.toml.orig from sdist #271

merged 1 commit into from
Mar 6, 2020

Conversation

ijl
Copy link
Contributor

@ijl ijl commented Feb 26, 2020

This path began appearing in the output of
cargo package --list --allow-dirty --manifest-path=Cargo.toml around
nightly-2020-02-22. It doesn't exist prior to the call and isn't created
by it. This causes:

💥 maturin failed
Caused by: Failed to build source distribution
Caused by: Failed to add file from Cargo.toml.orig to sdist as Cargo.toml.orig
Caused by: No such file or directory (os error 2) when getting metadata for Cargo.toml.orig

This path began appearing in the output of
cargo package --list --allow-dirty --manifest-path=Cargo.toml around
nightly-2020-02-22. It doesn't exist prior to the call and isn't created
by it. This causes:

💥 maturin failed
  Caused by: Failed to build source distribution
  Caused by: Failed to add file from Cargo.toml.orig to sdist as Cargo.toml.orig
  Caused by: No such file or directory (os error 2) when getting metadata for Cargo.toml.orig
@konstin
Copy link
Member

konstin commented Feb 26, 2020

Imho this is a cargo bug, caused by rust-lang/cargo#7905. I've filed this as a bug in rust-lang/cargo#7938.

Thanks for reporting this!

@konstin
Copy link
Member

konstin commented Feb 26, 2020

(I'm going to leave this open until there is a decision on the bug report. In case they argue that it is correct to include Cargo.toml.orig, I'm going to merge this)

@ijl
Copy link
Contributor Author

ijl commented Feb 26, 2020

It's a fatal error to maturin but not a practical issue for cargo, and there are rust releases with this behavior even if it's fixed later, so it may worth just working around anyway.

@oconnor663
Copy link
Contributor

The instructions int the README no longer work due to this issue, for the release version of maturin. When I added pyproject.toml to my project, I started seeing this error from several commands. If it's not appropriate to fix this in maturin itself, what workaround would you suggest for users? I'd be happy to submit a PR documenting this workaround in the README.

@oconnor663
Copy link
Contributor

For some unfortunate reason, Google does not find this issue when I search "Failed to add file from Cargo.toml.orig to sdist as Cargo.toml.orig". It took me quite some time to get here, and I worry others might be similarly stuck.

@konstin
Copy link
Member

konstin commented Mar 6, 2020

So it seems we actually need to filter ourselves.

Thanks again for the pull request!

@konstin konstin merged commit cb96ef3 into PyO3:master Mar 6, 2020
@ijl ijl deleted the filter-orig branch March 6, 2020 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants