diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-18 20:27:56 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-18 20:27:56 -0500 |
commit | dc9b65a68d891323ceee0c4df414f6ae182a98a3 (patch) | |
tree | abdc4ecfe460c79a5774dfe78c6be491c0951ab3 | |
parent | 9bab508604ae1aa4ca64aa177a3f0068415792fd (diff) | |
download | python-setuptools-bitbucket-dc9b65a68d891323ceee0c4df414f6ae182a98a3.tar.gz |
Use non-posix semantics in a WindowsCommandSpec and use that class in the Windows script writers. Fixes #331.
-rwxr-xr-x | setuptools/command/easy_install.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 137193f1..541666ce 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -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 |