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

Failed to build sdist when using python first src layout #1186

Closed
messense opened this issue Oct 10, 2022 · 2 comments · Fixed by #1187
Closed

Failed to build sdist when using python first src layout #1186

messense opened this issue Oct 10, 2022 · 2 comments · Fixed by #1187
Labels
bug Something isn't working sdist Source distribution

Comments

@messense
Copy link
Member

#1185 was merged too soon, opening an issue to track this.

$ maturin sdist -o dist
🍹 Building a mixed python/rust project
🔗 Found pyo3 bindings
🐍 Found CPython 3.10 at /Users/messense/.pyenv/versions/3.10.6/bin/python3
💥 maturin failed
  Caused by: Failed to build source distribution
  Caused by: Failed to add 340 bytes to sdist as /Users/messense/Projects/maturin/test-crates/pyo3-mixed-src/rust/Cargo.toml
  Caused by: paths in archives must be relative when setting path for

It's actually a general issue when Cargo.toml isn't located at the top level directory since we use cargo package --list --allow-dirty to get the list of files that should be included in sdist.

@messense messense added bug Something isn't working sdist Source distribution labels Oct 10, 2022
@konstin
Copy link
Member

konstin commented Oct 10, 2022

It's actually a general issue when Cargo.toml isn't located at the top level directory since we use cargo package --list --allow-dirty to get the list of files that should be included in sdist.

oh i've never thought about that :/

@messense
Copy link
Member Author

That was partially resolved in #1099 already, so just need a few tweaks to make src layout work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sdist Source distribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants