diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-04 16:56:23 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-04 16:56:23 -0500 |
commit | 390e64c37fb7dcb57b8e6062192e4c4375be8b78 (patch) | |
tree | 765fc239c9d386035e922000ff17f31f06f82d27 /setuptools/command/easy_install.py | |
parent | db3ee08fdba76c74e3f25ae7d7f56117e68223b0 (diff) | |
download | external_python_setuptools-390e64c37fb7dcb57b8e6062192e4c4375be8b78.tar.gz external_python_setuptools-390e64c37fb7dcb57b8e6062192e4c4375be8b78.tar.bz2 external_python_setuptools-390e64c37fb7dcb57b8e6062192e4c4375be8b78.zip |
Moved get_script_header into ScriptWriter class
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-x | setuptools/command/easy_install.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index c2928c77..bf648384 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1592,11 +1592,6 @@ def _first_line_re(): return re.compile(first_line_re.pattern.decode()) -def get_script_header(script_text, executable=sys_executable, wininst=False): - executable = "python.exe" if wininst else nt_quote_arg(executable) - return ScriptWriter.get_header(script_text, executable) - - def auto_chmod(func, arg, exc): if func is os.remove and os.name == 'nt': chmod(arg, stat.S_IWRITE) @@ -1887,6 +1882,11 @@ class ScriptWriter(object): return writer._gen_args(dist, header) @classmethod + def get_script_header(cls, script_text, executable=sys_executable, wininst=False): + executable = "python.exe" if wininst else nt_quote_arg(executable) + return cls.get_header(script_text, executable) + + @classmethod def _gen_args(cls, dist, header=None): """ Yield write_script() argument tuples for a distribution's entrypoints @@ -2016,6 +2016,7 @@ class WindowsExecutableLauncherWriter(WindowsScriptWriter): # for backward-compatibility get_script_args = ScriptWriter.get_script_args +get_script_header = ScriptWriter.get_script_header def get_win_launcher(type): |