venv: Fix filtering of files to copy.
This commit is contained in:
parent
feb964cff9
commit
768e6ac5bf
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user