diff options
author | Greg Ward <gward@python.net> | 2000-08-29 01:15:18 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-08-29 01:15:18 (GMT) |
commit | 9821bf4e62bcb7d503aed782a8f6398e5de720af (patch) | |
tree | 4727c267ef2488568ee3d8bb945c592d9c61c16e /Lib/distutils/command/build_py.py | |
parent | 31f182e830db13c3edbe12e58f9c737cc21583fa (diff) | |
download | cpython-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/build_py.py')
-rw-r--r-- | Lib/distutils/command/build_py.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py index 87e3efa..66f5024 100644 --- a/Lib/distutils/command/build_py.py +++ b/Lib/distutils/command/build_py.py @@ -177,13 +177,15 @@ class build_py (Command): self.check_package (package, package_dir) module_files = glob (os.path.join (package_dir, "*.py")) modules = [] - setup_script = os.path.abspath (sys.argv[0]) + setup_script = os.path.abspath(self.distribution.script_name) for f in module_files: abs_f = os.path.abspath (f) if abs_f != setup_script: module = os.path.splitext (os.path.basename (f))[0] modules.append ((package, module, f)) + else: + self.debug_print("excluding %s" % setup_script) return modules |