Mercurial > cpython-lru_cache-weakref
diff Lib/distutils/command/install_lib.py @ 84141:30aa032c4bd0
Issue #17177: Stop using imp in distutils
| author | Brett Cannon <brett@python.org> |
|---|---|
| date | Sat, 15 Jun 2013 12:59:53 -0400 |
| parents | a1c17a5a460f |
| children |
line wrap: on
line diff
--- a/Lib/distutils/command/install_lib.py Fri Jun 14 23:04:02 2013 -0400 +++ b/Lib/distutils/command/install_lib.py Sat Jun 15 12:59:53 2013 -0400 @@ -4,7 +4,7 @@ (install all Python modules).""" import os -import imp +import importlib.util import sys from distutils.core import Command @@ -165,10 +165,10 @@ if ext != PYTHON_SOURCE_EXTENSION: continue if self.compile: - bytecode_files.append(imp.cache_from_source( + bytecode_files.append(importlib.util.cache_from_source( py_file, debug_override=True)) if self.optimize > 0: - bytecode_files.append(imp.cache_from_source( + bytecode_files.append(importlib.util.cache_from_source( py_file, debug_override=False)) return bytecode_files
