diff options
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r-- | Lib/distutils/command/build_py.py | 4 | ||||
-rw-r--r-- | Lib/distutils/command/sdist.py | 5 |
2 files changed, 7 insertions, 2 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 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 |