From 29b9526a8e6fcd4e3f0a947a6cf240047270cd58 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 24 Jan 2015 17:56:55 +0100 Subject: [PATCH] venv: Ignore more unneeded files when copying PyQt --- scripts/init_venv.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/init_venv.py b/scripts/init_venv.py index 8d004c001..5c480bda3 100644 --- a/scripts/init_venv.py +++ b/scripts/init_venv.py @@ -130,11 +130,14 @@ def verbose_copy(src, dst, *, follow_symlinks=True): def get_ignored_files(directory, files): """Get the files which should be ignored for link_pyqt() on Windows.""" needed_exts = ('.py', '.dll', '.pyd', '.so') + ignored_dirs = ('examples', 'qml', 'uic', 'doc') filtered = [] for f in files: ext = os.path.splitext(f)[1] full_path = os.path.join(directory, f) - if (ext not in needed_exts) and os.path.isfile(full_path): + if os.path.isdir(full_path) and f in ignored_dirs: + filtered.append(f) + elif (ext not in needed_exts) and os.path.isfile(full_path): filtered.append(f) return filtered