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.pyand severalencodingmodules) are shipped as.pyconly, 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.