-
-
Notifications
You must be signed in to change notification settings - Fork 274
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
Add support for python first src layout - take 2 #1185
Conversation
✅ Deploy Preview for maturin-guide ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
for parent in fs::canonicalize(&path)?.ancestors().skip(1) { | ||
if !parent.starts_with(&workspace_root) { | ||
// Allow looking outside to the parent directory of Cargo workspace root |
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'm a bit worried about this. It's for supporting maturin build --manifest-path /path/to/rust/Cargo.toml
when pyproject.toml
is located in the parent directory of the rust crate.
But it might have unexpected side effects, I'm not sure.
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 think i'd make --manifest-path
take either Cargo.toml or pyproject.toml, whichever is in the project root. that would be an unexpected break from the normal cargo semantics, but i think it makes sense overall to point to the most top level configuration file
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.
make
--manifest-path
take either Cargo.toml or pyproject.toml, whichever is in the project root
It's certainly doable but not as intuitive as just Cargo.toml
, we can explore it later.
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.
💯
``` my-project ├── Readme.md ├── pyproject.toml ├── src │ └── my_project │ ├── __init__.py │ └── bar.py └── rust ├── Cargo.toml └── src └── lib.rs ```
https://build.opensuse.org/request/show/1036879 by user mia + dimstar_suse - Update to v0.14.0: * Breaking Change: Remove support for specifying python package metadata in `Cargo.toml` Python package metadata should be specified in the `project` section of `pyproject.toml` instead as PEP 621 specifies. gh#PyO3/maturin#1200 * Initial support for shipping bin targets as wasm32-wasi binaries that are run through wasmtime Note that wasmtime currently only support the five most popular platforms and that wasi binaries have restrictions when interacting with the host. Usage is by setting `--target wasm32-wasi`. gh#PyO3/maturin#1107 * Add support for python first `src` project layout gh#PyO3/maturin#1185 * Add `--src` option to generate src layout for mixed Python/Rust projects gh#PyO3/maturin#1189 * Add Python metadata support for `license-file
Implements #501 (comment)