From 8560bb816720a6b8069f9850d5203ed2425e9cbc Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Thu, 7 Nov 2002 16:41:38 +0000 Subject: Fix a small bug when sys.argv[0] has an absolute path. See http://mail.python.org/pipermail/distutils-sig/2002-November/003039.html --- Lib/distutils/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index d180eb8..001e74b 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:] -- cgit v0.12