Skip to content

Commit c12c837

Browse files
committed
Improve frozen prep to skip example subdirectories
1 parent 8048dcb commit c12c837

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tools/preprocess_frozen_modules.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ def version_string(path=None, *, valid_semver=False):
3232
def copy_and_process(in_dir, out_dir):
3333
for root, subdirs, files in os.walk(in_dir):
3434

35-
# Skip library examples directories.
36-
if Path(root).name in ['examples', 'docs', 'tests']:
35+
# Skip library examples directory and subfolders.
36+
relative_path_parts = Path(root).relative_to(in_dir).parts
37+
if relative_path_parts and relative_path_parts[0] in ['examples', 'docs', 'tests']:
3738
continue
3839

3940
for file in files:

0 commit comments

Comments
 (0)