Skip to content

Maturin fails to use workspace license file #2743

@anuradhawick

Description

@anuradhawick

Bug Description

I have a workspace with multiple rust crates. The following fails

[package]
name = "pip"
version.workspace = true
edition.workspace = true
authors.workspace = true
description.workspace = true
readme.workspace = true
license-file.workspace = true

with error

💥 maturin failed
  Caused by: license file `/home/anuvini/Desktop/kmertools/LICENSE` exists outside of the project root `/home/anuvini/Desktop/kmertools/pip`
  Caused by: prefix not found

If I remove license-file.workspace = true and add a symlink to license in root folder, it succeeds.

Only started seeing this issue since I updated from 1.7.8 to 1.9.4

Your maturin version (maturin --version)

1.9.4

Your Python version (python -V)

3.10.9

Your pip version (pip -V)

pip 23.0

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

Create a rust workspace

Add a crate that uses maturin

Add license path as follows in the Cargo.toml

license-file.workspace = true

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions