preprocess_frozen_modules: exclude subdirs of examples, docs, tests

.. this reclaims several kB on CPX, where we really need it.
This commit is contained in:
Jeff Epler 2019-12-17 10:01:33 -06:00
parent 20f7fbc6f5
commit 6a8efa6ef1

View File

@ -35,6 +35,7 @@ def copy_and_process(in_dir, out_dir):
# Skip library examples directory and subfolders.
relative_path_parts = Path(root).relative_to(in_dir).parts
if relative_path_parts and relative_path_parts[0] in ['examples', 'docs', 'tests']:
del subdirs[:]
continue
for file in files: