diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-04 21:31:05 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-04 21:31:05 -0500 |
commit | 3ababa264dc404e9f8eae01045a4531b0b5bd692 (patch) | |
tree | 6c1a9b609fb941ccbaec4bd973c4c04c99b78c5c /setuptools/command/install_scripts.py | |
parent | bd9d38030cee59eb0e2ef9c8fb98fda5b1ff470f (diff) | |
download | python-setuptools-git-3ababa264dc404e9f8eae01045a4531b0b5bd692.tar.gz |
Update install_scripts to use CommandSpec for generating script headers.
Diffstat (limited to 'setuptools/command/install_scripts.py')
-rwxr-xr-x | setuptools/command/install_scripts.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index 1717e1cf..722b0566 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -13,9 +13,8 @@ class install_scripts(orig.install_scripts): self.no_ep = False def run(self): - from setuptools.command.easy_install import ( - ScriptWriter, sys_executable, nt_quote_arg, - ) + from setuptools.command.easy_install import ScriptWriter, CommandSpec + self.run_command("egg_info") if self.distribution.scripts: orig.install_scripts.run(self) # run first to set up self.outfiles @@ -31,15 +30,14 @@ class install_scripts(orig.install_scripts): ei_cmd.egg_name, ei_cmd.egg_version, ) bs_cmd = self.get_finalized_command('build_scripts') - executable = getattr(bs_cmd, 'executable', sys_executable) + cmd = CommandSpec.from_param(getattr(bs_cmd, 'executable', None)) is_wininst = getattr( self.get_finalized_command("bdist_wininst"), '_is_running', False ) if is_wininst: - executable = "python.exe" + cmd = CommandSpec.from_string("python.exe") writer = ScriptWriter.get_writer(force_windows=is_wininst) - header = ScriptWriter.get_header("", nt_quote_arg(executable)) - for args in writer.get_args(dist, header): + for args in writer.get_args(dist, cmd.as_header()): self.write_script(*args) def write_script(self, script_name, contents, mode="t", *ignored): |