|
From: <th...@us...> - 2014-10-16 17:46:17
|
Revision: 760
http://sourceforge.net/p/py2exe/svn/760
Author: theller
Date: 2014-10-16 17:46:15 +0000 (Thu, 16 Oct 2014)
Log Message:
-----------
Use the cmdline_style attribute of service targets.
Modified Paths:
--------------
trunk/py2exe-3/py2exe/runtime.py
Modified: trunk/py2exe-3/py2exe/runtime.py
===================================================================
--- trunk/py2exe-3/py2exe/runtime.py 2014-10-16 17:38:22 UTC (rev 759)
+++ trunk/py2exe-3/py2exe/runtime.py 2014-10-16 17:46:15 UTC (rev 760)
@@ -569,13 +569,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))
@@ -618,7 +623,7 @@
LOAD_FROM_DIR = r"""\
def __load():
import imp, os
- dllpath = os.path.join(os.path.dirname(__loader__.archive), '{0}')
+ dllpath = os.path.join(os.path.dirname(__loader__.archive), r'{0}')
try:
mod = imp.load_dynamic(__name__, dllpath)
except ImportError as details:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|