1. Anthony Tuininga
  2. cx_Freeze


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)

File cx_Freeze/hooks.py

View file
  • Ignore whitespace
+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"""