diff Lib/distutils/command/install_lib.py @ 73322:ea926dff958f 3.2

More fixes for PEP 3147 compliance in distutils (#11254)
author Éric Araujo <merwok@netwok.org>
date Thu, 03 Nov 2011 03:45:33 +0100
parents 3e26c9033306
children a1c17a5a460f
line wrap: on
line diff
--- a/Lib/distutils/command/install_lib.py	Thu Nov 03 03:38:44 2011 +0100
+++ b/Lib/distutils/command/install_lib.py	Thu Nov 03 03:45:33 2011 +0100
@@ -4,6 +4,7 @@
 (install all Python modules)."""
 
 import os
+import imp
 import sys
 
 from distutils.core import Command
@@ -164,9 +165,11 @@
             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