venv: Fix filtering of files to copy.

This commit is contained in:
Florian Bruhin 2015-01-23 19:14:46 +01:00
parent feb964cff9
commit 768e6ac5bf

View File

@ -127,10 +127,16 @@ def verbose_copy(src, dst, *, follow_symlinks=True):
shutil.copy(src, dst, follow_symlinks=follow_symlinks) 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.""" """Get the files which should be ignored for link_pyqt() on Windows."""
needed_exts = ('py', 'dll', 'pyd') needed_exts = ('.py', '.dll', '.pyd', '.so')
return [f for f in files if os.path.splitext(f)[1] not in needed_exts] 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(): def link_pyqt():