aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-01-04 15:49:50 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-01-04 15:49:50 -0500
commit4108a12a41f3c413f2ea5e8ede3075d67067cba5 (patch)
tree2f60fd43979eb38fd6e7a6a699b2ac08b5c8dead /setuptools/command/easy_install.py
parent76dd319a776b3fb7bc7836eb18429ab407379ea9 (diff)
downloadexternal_python_setuptools-4108a12a41f3c413f2ea5e8ede3075d67067cba5.tar.gz
external_python_setuptools-4108a12a41f3c413f2ea5e8ede3075d67067cba5.tar.bz2
external_python_setuptools-4108a12a41f3c413f2ea5e8ede3075d67067cba5.zip
Extract method for getting script args
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-xsetuptools/command/easy_install.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index c68fe757..4e05d670 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -1904,15 +1904,19 @@ class ScriptWriter(object):
"""
Yield write_script() argument tuples for a distribution's entrypoints
"""
- gen_class = cls.get_writer(wininst)
- spec = str(dist.as_requirement())
+ writer = cls.get_writer(wininst)
header = get_script_header("", executable, wininst)
+ return cls._gen_args(dist, writer, header)
+
+ @classmethod
+ def _gen_args(cls, dist, writer, header):
+ spec = str(dist.as_requirement())
for type_ in 'console', 'gui':
group = type_ + '_scripts'
for name, ep in dist.get_entry_map(group).items():
- script_text = gen_class.template % locals()
- for res in gen_class._get_script_args(type_, name, header,
- script_text):
+ script_text = writer.template % locals()
+ for res in writer._get_script_args(type_, name, header,
+ script_text):
yield res
@classmethod