-
Notifications
You must be signed in to change notification settings - Fork 89
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
chore: update to maturin's recommended project layout for rust/python… #695
Conversation
… projects The previous layout leads to an import error when installing with `maturin build` and `pip install .`. This error was common enough that `maturin` changed the recommended project layout to what this commit does. A prior PR attempted to solve this by altering `lib.name` in Cargo.toml, but that did not work for me. - [Prior PR](apache#694) - [maturin ImportError issue](PyO3/maturin#490) - [maturin changes recommended project structure](PyO3/maturin#855)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would still suggest changing Cargo.toml
too, to _internal
, that's what we have in pydantic-core which David probably set, so is likely to be right.
I'm sure @andygrove would have the same Q as on previous PR. @davidhewitt, could you spare a little more knowledge about the effects of changing
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @Michael-J-Ward
@andygrove , I have another commit queued up if you want to switch the |
This apes what `pydantic-core` does and was recommended as part of fixing the maturin build issue. - [pydantic-core](https://github.com/pydantic/pydantic-core/blob/e1fc99dd3207157aad77defc20ab6873fd268b5b/Cargo.toml#L49-L51) - [suggestion](apache#695 (review))
I think we can undo this last commit and ignore my question/concern. I missed that the maturin project definition was already qualifying Sorry for the noise. |
@andygrove, the commit that changes I created my own noise be referencing the suggestion in this PR in that commit message. |
Looks like you figured this out already, but yes I agree no need to change |
Supersedes #694
Rationale for this change
The previous layout leads to an import error when installing with
maturin build
andpip install .
.This error was common enough that
maturin
changed the recommended project layout to what this commit does.A prior PR attempted to solve this by altering
lib.name
in Cargo.toml, but that did not work for me.Maintainer of
pyo3
explains the issue on the prior PR