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

See http://mail.python.org/pipermail/distutils-sig/2002-November/003039.html
This commit is contained in:
Thomas Heller 2002-11-07 16:41:38 +00:00
parent 5b470e0a3a
commit 8560bb8167
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ def setup (**attrs):
klass = Distribution
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'):
attrs['script_args'] = sys.argv[1:]