Commits

Anthony Tuininga committed 90e9dde Merge

Merged in takluyver/cx_freeze/missing-modules (pull request #12)

Improve missing modules output

Comments (0)

Files changed (2)

cx_Freeze/finder.py

                 callers.sort()
                 sys.stdout.write("? %s imported from %s\n" % \
                         (name, ", ".join(callers)))
+            sys.stdout.write("This is not necessarily a problem - the modules "
+                             "may not be needed on this platform.\n")
             sys.stdout.write("\n")
 
     def WriteSourceFile(self, fileName):

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"""