-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not scan whole file tree when making MANIFEST
When building a MANIFEST from a MANIFEST.in, setuptools previously scanned the whole directory tree in to a list, and then picked matching files based on MANIFEST.in commands from this list. Now, files are found using the `glob` library from Python 3.5. This only explores directories that need to be scanned, resulting in a large speed improvement for projects with large file trees. A modified `glob` module has been included. It has been changed to support back to Python 2.6, and to include `.hidden` files in its matches. The previous functionality included `.hidden` files in its glob matches. It is unclear if this behaviour is desired and required, or accidental and not required, but for strict backwards-compatibility, this behaviour is kept. Each command in the MANIFEST.in is now represented by its own function on the FileList (`include`, `exclude`, `graft`, etc.) to allow for an efficient implementation. The previous commands `FileList.include_pattern` and `FileList.exclude_pattern` still exist for backwards compatibility, but these use the slow 'scan all files' method, so are discouraged. `global_include` by its nature must scan all directories in the project to work, so this does not receive any speed improvements. The changes will speed up creating packages for the vast majority of users. There are a few unusual corner cases, such as multiple `graft` commands operating on the same set of directories, that will be slower. These can be solved by consolidating the overlapping `graft` commands in to one command.
- Loading branch information
Showing
3 changed files
with
472 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.