summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/command/build_py.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/packaging/command/build_py.py')
-rw-r--r--Lib/packaging/command/build_py.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/packaging/command/build_py.py b/Lib/packaging/command/build_py.py
index 0eafffa..e5b10b0 100644
--- a/Lib/packaging/command/build_py.py
+++ b/Lib/packaging/command/build_py.py
@@ -1,6 +1,7 @@
"""Build pure Python modules (just copy to build directory)."""
import os
+import imp
import sys
from glob import glob
@@ -330,9 +331,10 @@ class build_py(Command, Mixin2to3):
outputs.append(filename)
if include_bytecode:
if self.compile:
- outputs.append(filename + "c")
+ outputs.append(imp.cache_from_source(filename))
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)