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

Generate src layout for mixed Python/Rust projects in maturin new #1188

Closed
messense opened this issue Oct 11, 2022 · 2 comments · Fixed by #1189
Closed

Generate src layout for mixed Python/Rust projects in maturin new #1188

messense opened this issue Oct 11, 2022 · 2 comments · Fixed by #1189
Labels
enhancement New feature or request

Comments

@messense
Copy link
Member

Opt-in via --src option at first, maybe switching to src layout by default in the future.

Before

my-project
├── Cargo.toml
├── python
│   └── my_project
│       ├── __init__.py
│       └── bar.py
├── pyproject.toml
├── Readme.md
└── src
    └── lib.rs

After

my-project
├── Readme.md
├── pyproject.toml
├── src
│   └── my_project
│       ├── __init__.py
│       └── bar.py
└── rust
    ├── Cargo.toml
    └── src
        └── lib.rs
@messense messense added the enhancement New feature or request label Oct 11, 2022
@messense
Copy link
Member Author

maybe switching to src layout by default in the future

I'd like to listen to what users say about this before making the decision about changing default, it can stay opt-in if most people prefer Cargo tooling over Python tooling.

cc @clbarnes because of #501 (comment)

@clbarnes
Copy link
Contributor

I've definitely found cargo and extensions to be much more easy, effective, and robust than any of the versioning/ releasing options I've used for python so would prefer to have the option of using it that way round if possible! AFAIK, python doesn't have any default/magic handling around a directory with the name src in the way that rust does - so using src for rust confers a hard advantage, where for python it's just a pretty soft convention. But happy to be overruled if anyone can recommend a workflow which works well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants