mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
Issue #17177: Stop using imp in distutils
This commit is contained in:
parent
7822e123c4
commit
61c3556c14
7 changed files with 26 additions and 22 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue