bpo-40443: Remove unused imports in distutils (GH-19802)
This commit is contained in:
parent
90549676e0
commit
e488e300f5
|
@ -14,8 +14,6 @@ for older versions in distutils.msvc9compiler and distutils.msvccompiler.
|
|||
# ported to VS 2015 by Steve Dower
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import stat
|
||||
import subprocess
|
||||
import winreg
|
||||
|
||||
|
@ -65,8 +63,6 @@ def _find_vc2017():
|
|||
If vswhere.exe is not available, by definition, VS 2017 is not
|
||||
installed.
|
||||
"""
|
||||
import json
|
||||
|
||||
root = os.environ.get("ProgramFiles(x86)") or os.environ.get("ProgramFiles")
|
||||
if not root:
|
||||
return None, None
|
||||
|
|
|
@ -14,10 +14,10 @@ for the Borland C++ compiler.
|
|||
|
||||
import os
|
||||
from distutils.errors import \
|
||||
DistutilsExecError, DistutilsPlatformError, \
|
||||
DistutilsExecError, \
|
||||
CompileError, LibError, LinkError, UnknownFileError
|
||||
from distutils.ccompiler import \
|
||||
CCompiler, gen_preprocess_options, gen_lib_options
|
||||
CCompiler, gen_preprocess_options
|
||||
from distutils.file_util import write_file
|
||||
from distutils.dep_util import newer
|
||||
from distutils import log
|
||||
|
|
|
@ -8,7 +8,7 @@ from distutils.errors import *
|
|||
from distutils.spawn import spawn
|
||||
from distutils.file_util import move_file
|
||||
from distutils.dir_util import mkpath
|
||||
from distutils.dep_util import newer_pairwise, newer_group
|
||||
from distutils.dep_util import newer_group
|
||||
from distutils.util import split_quoted, execute
|
||||
from distutils import log
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ distributions)."""
|
|||
import subprocess, sys, os
|
||||
from distutils.core import Command
|
||||
from distutils.debug import DEBUG
|
||||
from distutils.util import get_platform
|
||||
from distutils.file_util import write_file
|
||||
from distutils.errors import *
|
||||
from distutils.sysconfig import get_python_version
|
||||
|
|
|
@ -8,7 +8,7 @@ import sys
|
|||
import warnings
|
||||
from distutils.core import Command
|
||||
from distutils.util import get_platform
|
||||
from distutils.dir_util import create_tree, remove_tree
|
||||
from distutils.dir_util import remove_tree
|
||||
from distutils.errors import *
|
||||
from distutils.sysconfig import get_python_version
|
||||
from distutils import log
|
||||
|
|
|
@ -11,7 +11,6 @@ try:
|
|||
from docutils.parsers.rst import Parser
|
||||
from docutils import frontend
|
||||
from docutils import nodes
|
||||
from io import StringIO
|
||||
|
||||
class SilentReporter(Reporter):
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ index).
|
|||
|
||||
import os
|
||||
import io
|
||||
import platform
|
||||
import hashlib
|
||||
from base64 import standard_b64encode
|
||||
from urllib.request import urlopen, Request, HTTPError
|
||||
|
|
|
@ -51,12 +51,10 @@ import copy
|
|||
from subprocess import Popen, PIPE, check_output
|
||||
import re
|
||||
|
||||
from distutils.ccompiler import gen_preprocess_options, gen_lib_options
|
||||
from distutils.unixccompiler import UnixCCompiler
|
||||
from distutils.file_util import write_file
|
||||
from distutils.errors import (DistutilsExecError, CCompilerError,
|
||||
CompileError, UnknownFileError)
|
||||
from distutils import log
|
||||
from distutils.version import LooseVersion
|
||||
from distutils.spawn import find_executable
|
||||
|
||||
|
|
|
@ -19,8 +19,7 @@ import re
|
|||
|
||||
from distutils.errors import DistutilsExecError, DistutilsPlatformError, \
|
||||
CompileError, LibError, LinkError
|
||||
from distutils.ccompiler import CCompiler, gen_preprocess_options, \
|
||||
gen_lib_options
|
||||
from distutils.ccompiler import CCompiler, gen_lib_options
|
||||
from distutils import log
|
||||
from distutils.util import get_platform
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ from distutils.errors import \
|
|||
DistutilsExecError, DistutilsPlatformError, \
|
||||
CompileError, LibError, LinkError
|
||||
from distutils.ccompiler import \
|
||||
CCompiler, gen_preprocess_options, gen_lib_options
|
||||
CCompiler, gen_lib_options
|
||||
from distutils import log
|
||||
|
||||
_can_read_reg = False
|
||||
|
|
|
@ -15,7 +15,6 @@ import re
|
|||
import sys
|
||||
|
||||
from .errors import DistutilsPlatformError
|
||||
from .util import get_platform, get_host_platform
|
||||
|
||||
# These are needed in a couple of spots, so just compute them once.
|
||||
PREFIX = os.path.normpath(sys.prefix)
|
||||
|
|
Loading…
Reference in New Issue