add ignore marker file to default project searcher #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the
DefaultProjectFileSearcher
is very conservative, but I think some changes it might provide a better experience for the majority of users.I ran into a case where I had a package with a
tests/
directory (containing only .py files) and I realised there was no built-in way to ignore this directory other than passing a customProjectFileSearcher
toinstall()
which is not ideal when working in a team.With this change, a
.maturin_hook_ignore
file could be added totests/
to have that directory ignored.Additionally, I don't think there are many use cases for depending on .py files for the compiled part of a package, but it is very common to have .py files in the repository of a maturin package that do not need to trigger a rebuild.
If a package depends on .py files at compile time with
include_str!()
or similar then a customProjectFileSearcher
can be passed, or the following can be put before callinginstall()
: