Commit bc3389a6 authored by Jason R. Coombs's avatar Jason R. Coombs

Extract _requirement_spec method for rendering the requirement specification for scripts. Ref #439.

parent 9f5f2ac2
......@@ -766,7 +766,7 @@ class easy_install(Command):
def install_script(self, dist, script_name, script_text, dev_path=None):
"""Generate a legacy script wrapper and install it"""
spec = str(dist.as_requirement())
spec = self._requirement_spec(dist)
is_script = is_python_script(script_text, script_name)
if is_script:
......@@ -774,6 +774,10 @@ class easy_install(Command):
self._load_template(dev_path) % locals())
self.write_script(script_name, _to_ascii(script_text), 'b')
@staticmethod
def _requirement_spec(dist):
return str(dist.as_requirement())
@staticmethod
def _load_template(dev_path):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment