summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/build_py.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-06-15 16:59:53 (GMT)
committerBrett Cannon <brett@python.org>2013-06-15 16:59:53 (GMT)
commit61c3556c14d52e553ca5eecc4e178124fac75167 (patch)
treeecadf6dc78159a42de1f2173599e2eb9a7c29254 /Lib/distutils/command/build_py.py
parent7822e123c42b63c5819e0b6cca6f960b1ce55547 (diff)
downloadcpython-61c3556c14d52e553ca5eecc4e178124fac75167.zip
cpython-61c3556c14d52e553ca5eecc4e178124fac75167.tar.gz
cpython-61c3556c14d52e553ca5eecc4e178124fac75167.tar.bz2
Issue #17177: Stop using imp in distutils
Diffstat (limited to 'Lib/distutils/command/build_py.py')
-rw-r--r--Lib/distutils/command/build_py.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py
index 1371b3d..677723f 100644
--- a/Lib/distutils/command/build_py.py
+++ b/Lib/distutils/command/build_py.py
@@ -3,7 +3,7 @@
Implements the Distutils 'build_py' command."""
import os
-import imp
+import importlib.util
import sys
from glob import glob
@@ -312,11 +312,11 @@ class build_py (Command):
outputs.append(filename)
if include_bytecode:
if self.compile:
- outputs.append(imp.cache_from_source(filename,
- debug_override=True))
+ outputs.append(importlib.util.cache_from_source(
+ filename, debug_override=True))
if self.optimize > 0:
- outputs.append(imp.cache_from_source(filename,
- debug_override=False))
+ outputs.append(importlib.util.cache_from_source(
+ filename, debug_override=False))
outputs += [
os.path.join(build_dir, filename)