exclude '.tox', '.nox' from being copied during 'pip install .' by omry · Pull Request #6770 · pypa/pip (original) (raw)

'pip install .' is very slow in the presence of large directories in the source tree.
Specifial test automation directries (.tox, .nox).
This diff excludes the common culprits from the copy to a temporary directory, speeding up pip install .
significantly in such cases.

For my own repo, this gets the pip install . speed from 1 minute and 30 seconds to 2 seconds.

EDIT:
I changed this PR to address only .tox and .nox due to concerns about not copying scm directories breaking build systems.

Future improvements to this should be in the form of changing the build to build a sdist from the current directory, and then build a wheel using that.
(see comment below from @pfmoore).