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

Fix files finding error if the glob result of excludes containing directory. #17

Merged
merged 2 commits into from
Apr 26, 2021

Conversation

linw1995
Copy link
Member

@linw1995 linw1995 commented Apr 25, 2021

Recently I used pdm build to build the source distribution file and found out it contains some un-required files such as cache files generated by mypy. So I used excludes = ["**/.mypy_cache"] from [tool.pdm] sections in pyproject.toml file. But it doesn't work at all.

I did some digging about the root cause of this problem. The _find_files_iter method uses exclude glob patterns to generate directories and files which need to be excluded from the distribution building. But the _match_path doesn't consider the scenario of pattern as a directory.

@frostming frostming merged commit af56365 into pdm-project:master Apr 26, 2021
@frostming
Copy link
Contributor

LGTM

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

Successfully merging this pull request may close these issues.

2 participants