Commit 853a9df4 authored by Ofekmeister's avatar Ofekmeister

Fix issue #459

Patched sys.argv[0] before loading entry point
parent 0addcafe
......@@ -2022,6 +2022,8 @@ class ScriptWriter(object):
from pkg_resources import load_entry_point
if __name__ == '__main__':
import re
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
load_entry_point(%(spec)r, %(group)r, %(name)r)()
)
......
......@@ -78,6 +78,8 @@ class TestEasyInstallTest:
from pkg_resources import load_entry_point
if __name__ == '__main__':
import re
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
load_entry_point('spec', 'console_scripts', 'name')()
)
......
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