From: Thomas H. <th...@ct...> - 2014-09-26 18:43:34
|
Am 26.09.2014 um 10:15 schrieb Sommer Detlef: > > Perfect - this look very good. Thank you for the help ! Thanks for testing. > One last question - will the python 3 version of py2exe also support "cmdline_style='pywin32'" for windows services. It seems that this simple patch to py2exe/runtime.py will enable this support: @@ -569,13 +570,18 @@ optimize=self.options.optimize)) if target.exe_type == "service": + + cmdline_style = getattr(target, "cmdline_style", "py2exe") + if cmdline_style not in ["py2exe", "pywin32", "custom"]: + raise RuntimeError("cmdline_handler invalid") + # code for services # cmdline_style is one of: # py2exe # pywin32 # custom code_objects.append( - compile("cmdline_style = 'py2exe'; service_module_names = %r" % (target.modules,), + compile("cmdline_style = %r; service_module_names = %r" % (cmdline_style, target.modules,), "<service_info>", "exec", optimize=self.options.optimize)) |