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

maturin build --sdist: README.md was already added for workspace crate #2244

Open
1 task done
mhils opened this issue Oct 2, 2024 · 1 comment
Open
1 task done
Labels
bug Something isn't working sdist Source distribution

Comments

@mhils
Copy link
Contributor

mhils commented Oct 2, 2024

Bug Description

With a README file both in the workspace root and the crate root:

building a source distribution fails:

$ cd mitmproxy-rs
$ RUST_LOG=maturin=debug maturin build --sdist
2024-10-02T14:12:48.035925Z DEBUG into_build_context: maturin::project_layout: Found pyproject.toml in working directory at "/Users/mhils/git/mitmproxy_rs/mitmproxy-rs/pyproject.toml"
2024-10-02T14:12:48.037519Z DEBUG into_build_context: maturin::project_layout: Using cargo manifest path from working directory: "/Users/mhils/git/mitmproxy_rs/mitmproxy-rs/Cargo.toml"
2024-10-02T14:12:48.037891Z DEBUG into_build_context:resolve_cargo_metadata: maturin::project_layout: Resolving cargo metadata from "/Users/mhils/git/mitmproxy_rs/mitmproxy-rs/Cargo.toml"
2024-10-02T14:12:48.247759Z  INFO into_build_context:resolve_cargo_metadata: maturin::project_layout: close time.busy=210ms time.idle=1.25µs
2024-10-02T14:12:48.248315Z DEBUG into_build_context: maturin::project_layout: Project layout resolved project_root=/Users/mhils/git/mitmproxy_rs/mitmproxy-rs python_dir=/Users/mhils/git/mitmproxy_rs/mitmproxy-rs rust_module=/Users/mhils/git/mitmproxy_rs/mitmproxy-rs/mitmproxy_rs python_module=/Users/mhils/git/mitmproxy_rs/mitmproxy-rs/mitmproxy_rs extension_name=mitmproxy_rs module_name=mitmproxy_rs
🍹 Building a mixed python/rust project
🔗 Found pyo3 bindings with abi3 support for Python ≥ 3.10
2024-10-02T14:12:48.340243Z DEBUG into_build_context:check_executable: maturin::python_interpreter: Found CPython interpreter at /Users/mhils/git/mitmproxy/venv/bin/python executable=python
2024-10-02T14:12:48.340263Z  INFO into_build_context:check_executable: maturin::python_interpreter: close time.busy=49.0ms time.idle=1.83µs executable=python
🐍 Not using a specific python interpreter
📡 Using build options features from pyproject.toml
2024-10-02T14:12:48.340320Z  INFO into_build_context: maturin::build_options: close time.busy=305ms time.idle=1.50µs
2024-10-02T14:12:48.388449Z DEBUG maturin::source_distribution: Found path dependencies: ["mitmproxy"]
2024-10-02T14:12:48.388466Z DEBUG maturin::source_distribution: Found sdist root: /Users/mhils/git/mitmproxy_rs
2024-10-02T14:12:48.388469Z DEBUG maturin::source_distribution: Adding path dependency: mitmproxy at /Users/mhils/git/mitmproxy_rs/Cargo.toml
[...]
2024-10-02T14:12:48.503569Z DEBUG maturin::module_writer: Adding mitmproxy_rs-0.10.1.dev0/LICENSE from /Users/mhils/git/mitmproxy_rs/LICENSE
2024-10-02T14:12:48.503663Z DEBUG maturin::module_writer: Adding mitmproxy_rs-0.10.1.dev0/README.md from /Users/mhils/git/mitmproxy_rs/README.md
[...]
2024-10-02T14:12:48.664433Z DEBUG maturin::source_distribution: Rewriting Cargo.toml `package.readme` at /Users/mhils/git/mitmproxy_rs/mitmproxy-rs/Cargo.toml
2024-10-02T14:12:48.664452Z DEBUG maturin::source_distribution: Rewriting Cargo.toml `workspace.members` at /Users/mhils/git/mitmproxy_rs/mitmproxy-rs/Cargo.toml
[...]
2024-10-02T14:12:48.664641Z DEBUG maturin::module_writer: Adding mitmproxy_rs-0.10.1.dev0/mitmproxy-rs/README.md from /Users/mhils/git/mitmproxy_rs/mitmproxy-rs/README.md
[...]
2024-10-02T14:12:48.667225Z DEBUG maturin::module_writer: Adding mitmproxy_rs-0.10.1.dev0/mitmproxy-rs/stubtest-allowlist.txt from /Users/mhils/git/mitmproxy_rs/mitmproxy-rs/stubtest-allowlist.txt
💥 maturin failed
  Caused by: Failed to build source distribution
  Caused by: File mitmproxy_rs-0.10.1.dev0/README.md was already added from /Users/mhils/git/mitmproxy_rs/README.md, can't added it from /Users/mhils/git/mitmproxy_rs/mitmproxy-rs/README.md

Cargo.toml, mitmproxy-rs/Cargo.toml, and mitmproxy-rs/pyproject.toml do not specify any (custom) settings w.r.t. READMEs. I would have expected maturin to use mitmproxy-rs/README.md and not README.md.

This is a regression that started in 1.7.1. Refs #2184 and #2154.

Your maturin version (maturin --version)

1.7.4

Your Python version (python -V)

3.12

Your pip version (pip -V)

all

What bindings you're using

pyo3

Does cargo build work?

  • Yes, it works
@mhils mhils added the bug Something isn't working label Oct 2, 2024
@messense messense added the sdist Source distribution label Oct 3, 2024
@deadsoul44
Copy link

What is ETA for this? (no pressure intended)

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

No branches or pull requests

3 participants