summaryrefslogtreecommitdiff
path: root/setuptools/command/develop.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-06-15 17:19:42 -0400
committerJason R. Coombs <jaraco@jaraco.com>2020-06-15 17:19:42 -0400
commitb88c8849a58346700eccdf3b44aa6b57a4b6ebcf (patch)
tree8c019fa46747d500e463a4d76ffe029367740297 /setuptools/command/develop.py
parent3955acbb0da75df804d86a52d6fbcc269075a9d3 (diff)
downloadpython-setuptools-git-feature/simple-dist-name-in-scripts.tar.gz
Avoid the full spec and only rely on the dist name when generating script wrappers.feature/simple-dist-name-in-scripts
Diffstat (limited to 'setuptools/command/develop.py')
-rw-r--r--setuptools/command/develop.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py
index b5619246..5d17c04b 100644
--- a/setuptools/command/develop.py
+++ b/setuptools/command/develop.py
@@ -192,30 +192,4 @@ class develop(namespaces.DevelopInstaller, easy_install):
self.install_script(dist, script_name, script_text, script_path)
def install_wrapper_scripts(self, dist):
- dist = VersionlessRequirement(dist)
return easy_install.install_wrapper_scripts(self, dist)
-
-
-class VersionlessRequirement:
- """
- Adapt a pkg_resources.Distribution to simply return the project
- name as the 'requirement' so that scripts will work across
- multiple versions.
-
- >>> from pkg_resources import Distribution
- >>> dist = Distribution(project_name='foo', version='1.0')
- >>> str(dist.as_requirement())
- 'foo==1.0'
- >>> adapted_dist = VersionlessRequirement(dist)
- >>> str(adapted_dist.as_requirement())
- 'foo'
- """
-
- def __init__(self, dist):
- self.__dist = dist
-
- def __getattr__(self, name):
- return getattr(self.__dist, name)
-
- def as_requirement(self):
- return self.project_name