diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-09-27 07:50:30 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-09-27 07:50:30 -0400 |
commit | bc3389a6048b23871e50eaab20d8df06ba3ff53d (patch) | |
tree | 0ecf2783f73afeb218544dee046ffb2cdec522d3 /setuptools/command/easy_install.py | |
parent | 9f5f2ac2aa55dbac1dfe9da6c7a46d82355c75fa (diff) | |
download | external_python_setuptools-bc3389a6048b23871e50eaab20d8df06ba3ff53d.tar.gz external_python_setuptools-bc3389a6048b23871e50eaab20d8df06ba3ff53d.tar.bz2 external_python_setuptools-bc3389a6048b23871e50eaab20d8df06ba3ff53d.zip |
Extract _requirement_spec method for rendering the requirement specification for scripts. Ref #439.
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-x | setuptools/command/easy_install.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 45d180bb..2faff4c2 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -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: @@ -775,6 +775,10 @@ class easy_install(Command): 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): """ There are a couple of template scripts in the package. This |