]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix a small bug when sys.argv[0] has an absolute path.
authorThomas Heller <theller@ctypes.org>
Thu, 7 Nov 2002 16:41:38 +0000 (16:41 +0000)
committerThomas Heller <theller@ctypes.org>
Thu, 7 Nov 2002 16:41:38 +0000 (16:41 +0000)
See http://mail.python.org/pipermail/distutils-sig/2002-November/003039.html

Lib/distutils/core.py

index d180eb8cb6639b606e6df2b647a80828c105d505..001e74be47f25e95ec3919528887b8b0479bca12 100644 (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:]