From: Thomas Heller Date: Thu, 7 Nov 2002 16:41:38 +0000 (+0000) Subject: Fix a small bug when sys.argv[0] has an absolute path. X-Git-Tag: v2.3c1~3529 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8560bb816720a6b8069f9850d5203ed2425e9cbc;p=thirdparty%2FPython%2Fcpython.git Fix a small bug when sys.argv[0] has an absolute path. See http://mail.python.org/pipermail/distutils-sig/2002-November/003039.html --- diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index d180eb8cb663..001e74be47f2 100644 --- a/Lib/distutils/core.py +++ b/Lib/distutils/core.py @@ -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:]