Also see here: Disk space minimization for Python distributors
Here’s an easy thing that might save you ~0.3 MB. We haven’t had trouble with it in Fedora:
large auto-generated files (
pydoc_data/topics.py
and severalencoding
modules) are shipped as.pyc
only, without source, since the source is not very informative
Your remove_modules.txt
doesn’t list test
and other Lib/*/tests
. That’s implied, right?
Is there?
importlib should never look at the contents of .py
files if an up-to-date .pyc
is available.