Skip to content

Commit

Permalink
depend: display each excluded-Wine-DLL warning only once
Browse files Browse the repository at this point in the history
  • Loading branch information
rokm committed Aug 22, 2021
1 parent c873257 commit 6f0adb4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion PyInstaller/depend/dylib.py
Expand Up @@ -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):
"""
Expand All @@ -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
Expand Down

0 comments on commit 6f0adb4

Please sign in to comment.