aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-01-04 16:21:11 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-01-04 16:21:11 -0500
commit2170df350911390a4a9a205763475dc7a7a2fb54 (patch)
tree37d279bd01b487944522a44b7d94c1db1decb4ef /setuptools/command/easy_install.py
parentaabff23148950b34d1f956e7d5a63c6cd098662e (diff)
downloadexternal_python_setuptools-2170df350911390a4a9a205763475dc7a7a2fb54.tar.gz
external_python_setuptools-2170df350911390a4a9a205763475dc7a7a2fb54.tar.bz2
external_python_setuptools-2170df350911390a4a9a205763475dc7a7a2fb54.zip
Move decision logic about windows/header generation closer to install_scripts, as it doesn't appear to be used elsewhere.
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-xsetuptools/command/easy_install.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index e52b4736..d8d11d50 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -745,7 +745,7 @@ Please make the appropriate changes for your system and try again.
def install_wrapper_scripts(self, dist):
if not self.exclude_scripts:
- for args in get_script_args(dist):
+ for args in ScriptWriter._gen_args(dist):
self.write_script(*args)
def install_script(self, dist, script_name, script_text, dev_path=None):
@@ -921,7 +921,7 @@ Please make the appropriate changes for your system and try again.
# delete entry-point scripts to avoid duping
self.delete_blockers(
[os.path.join(script_dir, args[0]) for args in
- get_script_args(dist)]
+ ScriptWriter._gen_args(dist)]
)
# Build .egg file from tmpdir
bdist_egg.make_zipfile(
@@ -1902,15 +1902,18 @@ class ScriptWriter(object):
@classmethod
def get_script_args(cls, dist, executable=sys_executable, wininst=False):
- """
- Yield write_script() argument tuples for a distribution's entrypoints
- """
+ # for backward compatibility
writer = cls.get_writer(wininst)
header = get_script_header("", executable, wininst)
return writer._gen_args(dist, header)
@classmethod
- def _gen_args(cls, dist, header):
+ def _gen_args(cls, dist, header=None):
+ """
+ Yield write_script() argument tuples for a distribution's entrypoints
+ """
+ if header is None:
+ header = get_script_header("", sys_executable)
spec = str(dist.as_requirement())
for type_ in 'console', 'gui':
group = type_ + '_scripts'