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

Provide a way to disable rewriting path Cargo dependencies into local_dependencies/ folder #1586

Closed
alex opened this issue May 2, 2023 · 3 comments · Fixed by #1587
Closed
Labels
enhancement New feature or request sdist Source distribution

Comments

@alex
Copy link

alex commented May 2, 2023

Right now if you have a { path = ... } dependency in Cargo.toml, maturin will rewrite it to live in local_dependencies/. I would like a way to disable this, and instead just handle things at their existing locations.

@messense has suggested that this might also fix #1442

In terms of how to implement it, I can imagine two approaches:

  1. add a rewrite-path-dependencies = [true/false] option in pyproject.toml
  2. If the dependency is already included via include in pyproject.toml, then leave it as-is.
@alex alex added the enhancement New feature or request label May 2, 2023
@messense
Copy link
Member

messense commented May 2, 2023

I was thinking about adding a new "sdist generator".

The current one can be called cargo, and we can add a new one called git that generates sdist based on git ls-files with respect to include/exclude options of [tool.maturin].

What do you think?

@messense messense added the sdist Source distribution label May 2, 2023
@alex
Copy link
Author

alex commented May 2, 2023 via email

@messense
Copy link
Member

messense commented May 2, 2023

WIP in #1587.

bors bot added a commit that referenced this issue May 4, 2023
1587: Introduce `git` source distribution generator r=konstin a=messense

TODO:
- [x] How to handle projects that live inside a subdirectory of a git repository? For example our `test-crates/*`
- [x] Add a test case

Closes #1586 

Co-authored-by: messense <[email protected]>
bors bot added a commit that referenced this issue May 4, 2023
1587: Introduce `git` source distribution generator r=konstin a=messense

TODO:
- [x] How to handle projects that live inside a subdirectory of a git repository? For example our `test-crates/*`
- [x] Add a test case

Closes #1586 

Co-authored-by: messense <[email protected]>
bors bot added a commit that referenced this issue May 4, 2023
1587: Introduce `git` source distribution generator r=konstin a=messense

TODO:
- [x] How to handle projects that live inside a subdirectory of a git repository? For example our `test-crates/*`
- [x] Add a test case

Closes #1586 

Co-authored-by: messense <[email protected]>
bors bot added a commit that referenced this issue May 4, 2023
1587: Introduce `git` source distribution generator r=konstin a=messense

TODO:
- [x] How to handle projects that live inside a subdirectory of a git repository? For example our `test-crates/*`
- [x] Add a test case

Closes #1586 

Co-authored-by: messense <[email protected]>
bors bot added a commit that referenced this issue May 4, 2023
1587: Introduce `git` source distribution generator r=konstin a=messense

TODO:
- [x] How to handle projects that live inside a subdirectory of a git repository? For example our `test-crates/*`
- [x] Add a test case

Closes #1586 

Co-authored-by: messense <[email protected]>
bors bot added a commit that referenced this issue May 4, 2023
1587: Introduce `git` source distribution generator r=konstin a=messense

TODO:
- [x] How to handle projects that live inside a subdirectory of a git repository? For example our `test-crates/*`
- [x] Add a test case

Closes #1586 

Co-authored-by: messense <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sdist Source distribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants