Maturin breaks when you have a directory of stub files instead of a single stub file #792
Closed
2 tasks done
Labels
enhancement
New feature or request
Bug Description
When you run
maturin develop
on a pure Rust project containing a directory of stub files, you get the error messageFound a directory with the module name (solders) next to Cargo.toml, which indicates a mixed python/rust project, but the directory didn't contain an __init__.py file.
From looking at the maturin code, it looks like it thinks you have a mixed python/rust project when it sees a subdirectory with the same name as the library. If you change the stubs directory name then the type hints don't actually work.
Your Python version (
python -V
)Python 3.9
Your pip version (
pip -V
)21.2.4
What bindings you're using
No response
Does
cargo build
work?If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash
/
)?Steps to Reproduce
I've made an example repo here https://github.com/kevinheavey/maturin-stub-package-error
This is what I did:
maturin init
.maturin develop
and get the errorFound a directory with the module name (solders) next to Cargo.toml, which indicates a mixed python/rust project, but the directory didn't contain an __init__.py file.
The text was updated successfully, but these errors were encountered: