summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/build_py.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-11-03 02:45:33 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-11-03 02:45:33 (GMT)
commitc465b2f843218565c2908528555fbdb7c95523c0 (patch)
tree4f7a64f26a21bb4d2857f3a7840de45d719d886b /Lib/distutils/command/build_py.py
parent5df1108de262d8c181d4fad75f81ad309ce968e1 (diff)
downloadcpython-c465b2f843218565c2908528555fbdb7c95523c0.zip
cpython-c465b2f843218565c2908528555fbdb7c95523c0.tar.gz
cpython-c465b2f843218565c2908528555fbdb7c95523c0.tar.bz2
More fixes for PEP 3147 compliance in distutils (#11254)
Diffstat (limited to 'Lib/distutils/command/build_py.py')
-rw-r--r--Lib/distutils/command/build_py.py9
1 files changed, 6 insertions, 3 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)