Commit ac325f34 authored by Jason R. Coombs's avatar Jason R. Coombs Committed by GitHub

Merge pull request #736 from Ofekmeister/master

Fix issue #459
parents b9baa94e 735a66a5
......@@ -12,6 +12,9 @@ v26.0.0
v25.4.0
-------
* #459 via #736: On Windows systems, sys.argv[0] now correctly becomes the
name of entry point.
* Add Extension(py_limited_api=True). When set to a truthy value,
that extension gets a filename apropriate for code using Py_LIMITED_API.
When used correctly this allows a single compiled extension to work on
......
......@@ -2018,10 +2018,12 @@ class ScriptWriter(object):
template = textwrap.dedent("""
# EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r
__requires__ = %(spec)r
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
load_entry_point(%(spec)r, %(group)r, %(name)r)()
)
......
......@@ -74,10 +74,12 @@ class TestEasyInstallTest:
expected = header + DALS("""
# EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name'
__requires__ = 'spec'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
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