summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/sdist.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-08-29 01:15:18 (GMT)
committerGreg Ward <gward@python.net>2000-08-29 01:15:18 (GMT)
commit9821bf4e62bcb7d503aed782a8f6398e5de720af (patch)
tree4727c267ef2488568ee3d8bb945c592d9c61c16e /Lib/distutils/command/sdist.py
parent31f182e830db13c3edbe12e58f9c737cc21583fa (diff)
downloadcpython-9821bf4e62bcb7d503aed782a8f6398e5de720af.zip
cpython-9821bf4e62bcb7d503aed782a8f6398e5de720af.tar.gz
cpython-9821bf4e62bcb7d503aed782a8f6398e5de720af.tar.bz2
Added 'script_name' and 'script_args' instance attributes to Distribution.
Changed 'core.setup()' so it sets them to reasonable defaults. Tweaked how the "usage" string is generated: 'core' now provides 'gen_usage()', which is used instead of 'USAGE'. Modified "build_py" and "sdist" commands to refer to 'self.distribution.script_name' rather than 'sys.argv[0]'.
Diffstat (limited to 'Lib/distutils/command/sdist.py')
-rw-r--r--Lib/distutils/command/sdist.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py
index 2351ebb..06c8f1c 100644
--- a/Lib/distutils/command/sdist.py
+++ b/Lib/distutils/command/sdist.py
@@ -202,7 +202,10 @@ class sdist (Command):
# manifest, but there's no template -- which will happen if the
# developer elects to generate a manifest some other way -- then we
# can't regenerate the manifest, so we don't.)
- setup_newer = dep_util.newer(sys.argv[0], self.manifest)
+ self.debug_print("checking if %s newer than %s" %
+ (self.distribution.script_name, self.manifest))
+ setup_newer = dep_util.newer(self.distribution.script_name,
+ self.manifest)
# cases:
# 1) no manifest, template exists: generate manifest