diff options
author | Brett Cannon <brett@python.org> | 2013-06-15 12:59:53 -0400 |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2013-06-15 12:59:53 -0400 |
commit | 61c3556c14d52e553ca5eecc4e178124fac75167 (patch) | |
tree | ecadf6dc78159a42de1f2173599e2eb9a7c29254 /Lib/distutils/command/build_py.py | |
parent | 7822e123c42b63c5819e0b6cca6f960b1ce55547 (diff) | |
download | cpython-git-61c3556c14d52e553ca5eecc4e178124fac75167.tar.gz |
Issue #17177: Stop using imp in distutils
Diffstat (limited to 'Lib/distutils/command/build_py.py')
-rw-r--r-- | Lib/distutils/command/build_py.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py index 1371b3d6ff..677723f0b1 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) |