summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-06-15 16:19:51 -0400
committerGitHub <noreply@github.com>2020-06-15 16:19:51 -0400
commit1d841d78acd267ff2599a8bd9a90e264f233463a (patch)
tree2cf7f74ecf337df7dd75639619342ba03b0fdcfd
parentc999ba42e3cc99cfdf8c1eea88b9b0136104af12 (diff)
parentd74a16061950593f388a72871533b303b21e2a4e (diff)
downloadpython-setuptools-git-1d841d78acd267ff2599a8bd9a90e264f233463a.tar.gz
Merge pull request #2195 from ofek/fix
Fix entry point scripts
-rw-r--r--changelog.d/2195.misc.rst1
-rw-r--r--setuptools/command/easy_install.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/2195.misc.rst b/changelog.d/2195.misc.rst
new file mode 100644
index 00000000..f73994dd
--- /dev/null
+++ b/changelog.d/2195.misc.rst
@@ -0,0 +1 @@
+Fix broken entry points generated by easy-install (pip editable installs).
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index ab8258ca..2563f313 100644
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -2079,7 +2079,7 @@ class ScriptWriter:
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
- for entry_point in distribution(%(spec)r).entry_points:
+ for entry_point in distribution(%(spec)r.split('==')[0]).entry_points:
if entry_point.group == %(group)r and entry_point.name == %(name)r:
sys.exit(entry_point.load()())
""").lstrip() # noqa: E501