8000 `maturin sdist` doesn't include LICENSE on root when the root is not current directory · Issue #2531 · PyO3/maturin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
maturin sdist doesn't include LICENSE on root when the root is not current directory #2531
Closed
@sevenc-nanashi

Description

@sevenc-nanashi

Bug Description

I have a repository whose structure is like this: (where my-lib depends on my-lib-sub)

.
├── Cargo.toml
├── crates
│   ├── my-lib
│   │   ├── Cargo.toml
│   │   ├── LICENSE
│   │   ├── pyproject.toml
│   │   └── src
│   │       └── lib.rs
│   └── my-lib-sub
│       ├── Cargo.toml
│       └── src
│           └── lib.rs
└── LICENSE

I ran maturin sdist in crates/my-lib, and I got this archive:

❯ tar -tvf /home/sevenc7c/maturin-min-repro/target/wheels/my_lib-0.1.0.tar.gz
-rw-r--r-- 0/0              81 1970-01-01 09:00 my_lib-0.1.0/crates/my-lib-sub/Cargo.toml
-rw-r--r-- 1000/1000         8 2025-03-25 14:42 my_lib-0.1.0/crates/my-lib-sub/.gitignore
-rw-r--r-- 1000/1000       210 2025-03-25 14:42 my_lib-0.1.0/crates/my-lib-sub/src/lib.rs
-rw-r--r-- 0/0             296 1970-01-01 09:00 my_lib-0.1.0/crates/my-lib/Cargo.toml
-rw-r--r-- 1000/1000       686 2025-03-25 14:41 my_lib-0.1.0/crates/my-lib/.gitignore
-rw-r--r-- 1000/1000       477 2025-03-25 14:46 my_lib-0.1.0/crates/my-lib/LICENSE
-rw-r--r-- 1000/1000       369 2025-03-25 14:43 my_lib-0.1.0/crates/my-lib/src/lib.rs
-rw-r--r-- 1000/1000      4517 2025-03-25 14:43 my_lib-0.1.0/Cargo.lock
-rw-r--r-- 0/0              50 1970-01-01 09:00 my_lib-0.1.0/Cargo.toml
-rw-r--r-- 0/0             429 1970-01-01 09:00 my_lib-0.1.0/pyproject.toml
-rw-r--r-- 0/0             292 1970-01-01 09:00 my_lib-0.1.0/PKG-INFO

This tar.gz doesn't include my_lib-0.1.0/LICENSE, thus this sdist cannot be uploaded to PyPI.

Your maturin version (maturin --version)

maturin 1.8.3

Your Python version (python -V)

Python 3.12.9

Your pip version (pip -V)

N/A (I'm using uv 0.6.8)

What bindings you're using

PyO3

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

  1. Clone https://github.com/sevenc-nanashi/maturin-min-repro
  2. Run maturin sdist in crates/my-lib

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpep-complianceCompliance with PEPsdistSource distribution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0