From: <th...@us...> - 2014-09-11 07:21:58
|
Revision: 749 http://sourceforge.net/p/py2exe/svn/749 Author: theller Date: 2014-09-11 07:21:47 +0000 (Thu, 11 Sep 2014) Log Message: ----------- Print a meaningful error message when the build fails because bundle_files is too low for certain packages. Add ctypes to the modules needed for bootstrap; it is used by boot_common. Modified Paths: -------------- trunk/py2exe-3/ChangeLog trunk/py2exe-3/py2exe/runtime.py Modified: trunk/py2exe-3/ChangeLog =================================================================== --- trunk/py2exe-3/ChangeLog 2014-05-12 12:34:41 UTC (rev 748) +++ trunk/py2exe-3/ChangeLog 2014-09-11 07:21:47 UTC (rev 749) @@ -1,7 +1,17 @@ +2014-09-11 <th...@ct...> + + * py2exe/runtime.py Print a meaningful error message when the + build fails because bundle_files is too low for certain packages. + +2014-05-26 <th...@ct...> + + * py2exe/runtime.py (Runtime.bootstrap_modules): Add ctypes to the + modules needed for bootstrap; it is used by boot_common. + 2014-05-12 <th...@ct...> - * Add missing DeactivateActCtx() call. - Change version number to 0.9.2.1. + * Add missing DeactivateActCtx() call. Change version number to + 0.9.2.1. 2014-05-09 <th...@ct...> Modified: trunk/py2exe-3/py2exe/runtime.py =================================================================== --- trunk/py2exe-3/py2exe/runtime.py 2014-05-12 12:34:41 UTC (rev 748) +++ trunk/py2exe-3/py2exe/runtime.py 2014-09-11 07:21:47 UTC (rev 749) @@ -119,6 +119,7 @@ "codecs", "io", "encodings.*", + "ctypes", # needed for the boot_common boot script } def __init__(self, options): @@ -190,13 +191,23 @@ elif missing: mf.report_missing() + errors = [] for name, value in self.mf.get_min_bundle().items(): if value > self.options.bundle_files: # warn if modules are know to work only for a minimum # bundle_files value - print("OOPS:", name, value) - raise SystemExit(-1) + errors.append([name, value]) + if errors: + print("The following modules require a minimum bundle_files option,") + print("otherwise they will not work.") + print("Currently bundle_files is set to %d:\n" % self.options.bundle_files) + for name, value in errors: + print(" %s: %s" % (name, value)) + print("\nPlease change the bundle_files option and run the build again.") + print("Build failed.") + raise SystemExit(-1) + def build(self): """Build everything. """ @@ -574,11 +585,9 @@ code_objects.append(boot_code) - with open(target.script, "U") as script_file: + with open(target.script, "rb") as script_file: code_objects.append( - # XXX what about compiler options? - # XXX what about source file encodings? - compile(script_file.read() + "\n", + compile(script_file.read() + b"\n", os.path.basename(target.script), "exec", optimize=self.options.optimize)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |