diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-04 22:29:37 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-04 22:29:37 -0500 |
commit | 0ad48553589fc68faeb7a5fc2f76da128249ac86 (patch) | |
tree | 0decbd493087f88b443081dcb5709b86a4ca0415 /setuptools/command/easy_install.py | |
parent | 4356a2dc99a74be0d970f63e045eba40f463695d (diff) | |
download | external_python_setuptools-0ad48553589fc68faeb7a5fc2f76da128249ac86.tar.gz external_python_setuptools-0ad48553589fc68faeb7a5fc2f76da128249ac86.tar.bz2 external_python_setuptools-0ad48553589fc68faeb7a5fc2f76da128249ac86.zip |
Add test capturing expectation around sys.executable having spaces in the name.
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-x | setuptools/command/easy_install.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index fb953dbb..54a3bc3a 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1859,8 +1859,11 @@ class CommandSpec(list): """ options = [] - _default = os.path.normpath(sys.executable) - launcher = os.environ.get('__PYVENV_LAUNCHER__', _default) + + @classmethod + def _sys_executable(cls): + _default = os.path.normpath(sys.executable) + return os.environ.get('__PYVENV_LAUNCHER__', _default) @classmethod def from_param(cls, param): @@ -1879,7 +1882,7 @@ class CommandSpec(list): @classmethod def from_environment(cls): - return cls.from_string(cls.launcher) + return cls.from_string(cls._sys_executable()) @classmethod def from_string(cls, string): |