diff options
author | Éric Araujo <merwok@netwok.org> | 2011-11-03 04:17:11 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-11-03 04:17:11 (GMT) |
commit | e64052176d998a0f1397fc5fa60875e2f0371296 (patch) | |
tree | 24bef62ead0b04345cc7e83c6c0e438ef0929c20 /Lib/distutils/command | |
parent | 880801501b778d93079afc11672dba86e60eab94 (diff) | |
parent | c465b2f843218565c2908528555fbdb7c95523c0 (diff) | |
download | cpython-e64052176d998a0f1397fc5fa60875e2f0371296.zip cpython-e64052176d998a0f1397fc5fa60875e2f0371296.tar.gz cpython-e64052176d998a0f1397fc5fa60875e2f0371296.tar.bz2 |
Merge follow-up for #11254 and other changes from 3.2
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r-- | Lib/distutils/command/build_py.py | 9 | ||||
-rw-r--r-- | Lib/distutils/command/install_lib.py | 7 |
2 files changed, 11 insertions, 5 deletions
diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py index 3868c12..1371b3d 100644 --- a/Lib/distutils/command/build_py.py +++ b/Lib/distutils/command/build_py.py @@ -2,7 +2,8 @@ Implements the Distutils 'build_py' command.""" -import sys, os +import os +import imp import sys from glob import glob @@ -311,9 +312,11 @@ class build_py (Command): outputs.append(filename) if include_bytecode: if self.compile: - outputs.append(filename + "c") + outputs.append(imp.cache_from_source(filename, + debug_override=True)) if self.optimize > 0: - outputs.append(filename + "o") + outputs.append(imp.cache_from_source(filename, + debug_override=False)) outputs += [ os.path.join(build_dir, filename) diff --git a/Lib/distutils/command/install_lib.py b/Lib/distutils/command/install_lib.py index 3d01d07..15c08f1 100644 --- a/Lib/distutils/command/install_lib.py +++ b/Lib/distutils/command/install_lib.py @@ -4,6 +4,7 @@ Implements the Distutils 'install_lib' command (install all Python modules).""" import os +import imp import sys from distutils.core import Command @@ -164,9 +165,11 @@ class install_lib(Command): if ext != PYTHON_SOURCE_EXTENSION: continue if self.compile: - bytecode_files.append(py_file + "c") + bytecode_files.append(imp.cache_from_source( + py_file, debug_override=True)) if self.optimize > 0: - bytecode_files.append(py_file + "o") + bytecode_files.append(imp.cache_from_source( + py_file, debug_override=False)) return bytecode_files |