diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-08-17 10:44:18 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-08-17 10:44:18 -0400 |
commit | 2473aa6da27cb95c1582aee1bb188f76e0deb258 (patch) | |
tree | c2f629003de2b9114e9b9facf71049e78c7aca84 /setuptools/command/easy_install.py | |
parent | 3eb3c69afbe1d2ebbc98943a896ccbfc913113c1 (diff) | |
download | python-setuptools-git-2473aa6da27cb95c1582aee1bb188f76e0deb258.tar.gz |
Changed the launcher relevant environment variable to SETUPTOOLS_LAUNCHER and it now accepts different strings 'natural' and 'executable', instead of only reflecting a boolean value.
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-x | setuptools/command/easy_install.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index cf4402a5..19d6e494 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1834,13 +1834,13 @@ class WindowsScriptWriter(ScriptWriter): """ Get a script writer suitable for Windows """ - # for compatibility, return the writer that creates exe launchers - # unless the SETUPTOOLS_USE_PYLAUNCHER is set, indicating - # future behavior. - use_legacy = 'SETUPTOOLS_USE_PYLAUNCHER' not in os.environ - if use_legacy: - return WindowsLauncherScriptWriter - return cls + writer_lookup = dict( + executable=WindowsExecutableLauncherWriter, + natural=cls, + ) + # for compatibility, use the executable launcher by default + launcher = os.environ.get('SETUPTOOLS_LAUNCHER', 'executable') + return writer_lookup[launcher] @classmethod def _get_script_args(cls, type_, name, header, script_text): @@ -1874,7 +1874,7 @@ class WindowsScriptWriter(ScriptWriter): return new_header -class WindowsLauncherScriptWriter(WindowsScriptWriter): +class WindowsExecutableLauncherWriter(WindowsScriptWriter): @classmethod def _get_script_args(cls, type_, name, header, script_text): """ |