aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-01-18 20:27:56 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-01-18 20:27:56 -0500
commit27ffea086d37a26dbac2ebbd8b1e0edb4c8a803e (patch)
tree1ea7ced8274b17f9ea90fe1947dc73d430f87a40 /setuptools/command/easy_install.py
parent8711abcb4bac42e771647718e6994c6847e0383a (diff)
downloadexternal_python_setuptools-27ffea086d37a26dbac2ebbd8b1e0edb4c8a803e.tar.gz
external_python_setuptools-27ffea086d37a26dbac2ebbd8b1e0edb4c8a803e.tar.bz2
external_python_setuptools-27ffea086d37a26dbac2ebbd8b1e0edb4c8a803e.zip
Use non-posix semantics in a WindowsCommandSpec and use that class in the Windows script writers. Fixes #331.
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-xsetuptools/command/easy_install.py9
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