Commit 43ffa787 authored by Jason R. Coombs's avatar Jason R. Coombs

Allow the CommandSpec class to be resolved by the writer.

parent 97f96e8c
...@@ -1988,6 +1988,8 @@ class ScriptWriter(object): ...@@ -1988,6 +1988,8 @@ class ScriptWriter(object):
) )
""").lstrip() """).lstrip()
command_spec_class = CommandSpec
@classmethod @classmethod
def get_script_args(cls, dist, executable=None, wininst=False): def get_script_args(cls, dist, executable=None, wininst=False):
# for backward compatibility # for backward compatibility
......
...@@ -39,7 +39,7 @@ class install_scripts(orig.install_scripts): ...@@ -39,7 +39,7 @@ class install_scripts(orig.install_scripts):
writer = ei.WindowsScriptWriter writer = ei.WindowsScriptWriter
# resolve the writer to the environment # resolve the writer to the environment
writer = writer.best() writer = writer.best()
cmd = ei.CommandSpec.from_param(exec_param) cmd = writer.command_spec_cls.from_param(exec_param)
for args in writer.get_args(dist, cmd.as_header()): for args in writer.get_args(dist, cmd.as_header()):
self.write_script(*args) self.write_script(*args)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment