From 2473aa6da27cb95c1582aee1bb188f76e0deb258 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Aug 2013 10:44:18 -0400 Subject: 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. --- setuptools/command/easy_install.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'setuptools/command') 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): """ -- cgit v1.2.1