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 | 90c0eb628e627dc3d7b6c2db4d5ef1031ab81616 (patch) | |
tree | ea90732b01c275d7f825963571dbf348af66935a | |
parent | 3036b496d7856724ea1ca5f67257dda76a63dbfd (diff) | |
download | python-setuptools-bitbucket-90c0eb628e627dc3d7b6c2db4d5ef1031ab81616.tar.gz |
Extract _requirement_spec method for rendering the requirement specification for scripts. Ref #439.
-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 |