venv: Ignore more unneeded files when copying PyQt
This commit is contained in:
parent
1d167fa428
commit
29b9526a8e
@ -130,11 +130,14 @@ def verbose_copy(src, dst, *, follow_symlinks=True):
|
|||||||
def get_ignored_files(directory, files):
|
def get_ignored_files(directory, files):
|
||||||
"""Get the files which should be ignored for link_pyqt() on Windows."""
|
"""Get the files which should be ignored for link_pyqt() on Windows."""
|
||||||
needed_exts = ('.py', '.dll', '.pyd', '.so')
|
needed_exts = ('.py', '.dll', '.pyd', '.so')
|
||||||
|
ignored_dirs = ('examples', 'qml', 'uic', 'doc')
|
||||||
filtered = []
|
filtered = []
|
||||||
for f in files:
|
for f in files:
|
||||||
ext = os.path.splitext(f)[1]
|
ext = os.path.splitext(f)[1]
|
||||||
full_path = os.path.join(directory, f)
|
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)
|
filtered.append(f)
|
||||||
return filtered
|
return filtered
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user