diff --git a/scripts/init_venv.py b/scripts/init_venv.py index 5f2e440ab..9a3ceb746 100644 --- a/scripts/init_venv.py +++ b/scripts/init_venv.py @@ -127,10 +127,16 @@ def verbose_copy(src, dst, *, follow_symlinks=True): shutil.copy(src, dst, follow_symlinks=follow_symlinks) -def get_ignored_files(_directory, files): +def get_ignored_files(directory, files): """Get the files which should be ignored for link_pyqt() on Windows.""" - needed_exts = ('py', 'dll', 'pyd') - return [f for f in files if os.path.splitext(f)[1] not in needed_exts] + needed_exts = ('.py', '.dll', '.pyd', '.so') + 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): + filtered.append(f) + return filtered def link_pyqt():