Commit 8560bb81 authored by Thomas Heller's avatar Thomas Heller

Fix a small bug when sys.argv[0] has an absolute path.

See http://mail.python.org/pipermail/distutils-sig/2002-November/003039.html
parent 5b470e0a
...@@ -87,7 +87,7 @@ def setup (**attrs): ...@@ -87,7 +87,7 @@ def setup (**attrs):
klass = Distribution klass = Distribution
if not attrs.has_key('script_name'): if not attrs.has_key('script_name'):
attrs['script_name'] = sys.argv[0] attrs['script_name'] = os.path.basename(sys.argv[0])
if not attrs.has_key('script_args'): if not attrs.has_key('script_args'):
attrs['script_args'] = sys.argv[1:] attrs['script_args'] = sys.argv[1:]
......
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