diff --git a/PyInstaller/depend/dylib.py b/PyInstaller/depend/dylib.py index 5331d0d4067..98be81dfe8c 100644 --- a/PyInstaller/depend/dylib.py +++ b/PyInstaller/depend/dylib.py @@ -225,6 +225,8 @@ def search(self, libname): exclude_list = WinExcludeList(exclude_list) +_seen_wine_dlls = set() # Used for warning tracking in include_library() + def include_library(libname): """ @@ -239,7 +241,9 @@ def include_library(libname): # exclude lists. If excluded, the frozen application will still run under Wine, but if it were included, it would # likely cause problems under real Windows. So everything considered, we are better off excluding it. if compat.is_win_wine and compat.is_wine_dll(libname): - logger.warning("Excluding Wine built-in DLL: %s", libname) # displayed only if DLL would have been included + if libname not in _seen_wine_dlls: + logger.warning("Excluding Wine built-in DLL: %s", libname) # displayed only if DLL would have been included + _seen_wine_dlls.add(libname) # display only once for each DLL return False return True