Commits

Thomas Kluyver committed bde9717

Add hook to ignore hashlib's fallback modules if they don't exist.

  • Participants
  • Parent commits 8046f2e
  • Branches missing-modules

Comments (0)

Files changed (1)

cx_Freeze/hooks.py

     finder.IncludeModule("pangocairo")
 
 
+def load_hashlib(finder, module):
+    """hashlib's fallback modules don't exist if the equivalent OpenSSL
+    algorithms are loaded from _hashlib, so we can ignore the error."""
+    module.IgnoreName("_md5")
+    module.IgnoreName("_sha")
+    module.IgnoreName("_sha256")
+    module.IgnoreName("_sha512")
+
+
 def load_matplotlib(finder, module):
     """the matplotlib module requires data to be found in mpl-data in the
        same directory as the frozen executable so oblige it"""