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

Panic running sdist when python-source points outside of Rust source directory #2202

Open
1 of 2 tasks
ia0 opened this issue Aug 28, 2024 · 2 comments
Open
1 of 2 tasks
Labels
bug Something isn't working sdist Source distribution

Comments

@ia0
Copy link

ia0 commented Aug 28, 2024

Bug Description

maturin has panicked. This is a bug in maturin. Please report this
at https://github.com/PyO3/maturin/issues/new/choose.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 environment
variable set and include the backtrace in your report.

Platform: linux x86_64
Version: 1.7.1
Args: maturin sdist

thread 'main' panicked at /usr/local/google/home/cretin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/maturin-1.7.1/src/source_distribution.rs:617:75:
called `Result::unwrap()` on an `Err` value: StripPrefixError(())

Note that I'm most probably doing something wrong (I'm trying to build some wheels with a Python library and a Rust binary). But given it's a panic and apparently panics are not expected in Maturin, I'm creating a bug report.

Your maturin version (maturin --version)

1.7.1

Your Python version (python -V)

I don't have python, but python3 -V gives 3.11.9

Your pip version (pip -V)

24.0

What bindings you're using

bin

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

cd /tmp
git clone -b release [email protected]:ia0/magika.git
cd magika/rust/cli
maturin sdist

The current commit hash of the branch on my fork is 635af61bfcbc87df2b6e6ee982c701155fad6bde in case this changes before anyone tries to reproduce.

@ia0 ia0 added the bug Something isn't working label Aug 28, 2024
@messense messense added the sdist Source distribution label Aug 29, 2024
@messense

This comment was marked as outdated.

@messense
Copy link
Member

messense commented Sep 2, 2024

I took a look today, the problem is actually python-source = "../../python" option, we don't actually support python-source outside of rust source directory yet, it must be inside
or sibling of the rust source directory.

@messense messense changed the title Panic running sdist Panic running sdist when python-source points outside of Rust source directory Sep 2, 2024
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

2 participants