Commit 27ffea08 authored by Jason R. Coombs's avatar Jason R. Coombs

Use non-posix semantics in a WindowsCommandSpec and use that class in the...

Use non-posix semantics in a WindowsCommandSpec and use that class in the Windows script writers. Fixes #331.
parent 8711abcb
......@@ -1873,6 +1873,7 @@ class CommandSpec(list):
"""
options = []
split_args = dict()
@classmethod
def _sys_executable(cls):
......@@ -1904,7 +1905,7 @@ class CommandSpec(list):
Construct a command spec from a simple string representing a command
line parseable by shlex.split.
"""
items = shlex.split(string)
items = shlex.split(string, **cls.split_args)
return JythonCommandSpec.from_string(string) or cls(items)
def install_options(self, script_text):
......@@ -1935,6 +1936,10 @@ class CommandSpec(list):
sys_executable = CommandSpec._sys_executable()
class WindowsCommandSpec(CommandSpec):
split_args = dict(posix=False)
class JythonCommandSpec(CommandSpec):
@classmethod
def from_string(cls, string):
......@@ -2051,6 +2056,8 @@ class ScriptWriter(object):
class WindowsScriptWriter(ScriptWriter):
command_spec_class = WindowsCommandSpec
@classmethod
def get_writer(cls):
# for backward compatibility
......
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