mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-41282: setup.py ignores distutils DeprecationWarning (GH-25405)
This commit is contained in:
parent
92eebf6dd2
commit
d9ba9dee7f
1 changed files with 14 additions and 8 deletions
22
setup.py
22
setup.py
|
@ -8,6 +8,7 @@ import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import sysconfig
|
import sysconfig
|
||||||
|
import warnings
|
||||||
from glob import glob, escape
|
from glob import glob, escape
|
||||||
import _osx_support
|
import _osx_support
|
||||||
|
|
||||||
|
@ -30,14 +31,19 @@ except ImportError:
|
||||||
SUBPROCESS_BOOTSTRAP = True
|
SUBPROCESS_BOOTSTRAP = True
|
||||||
|
|
||||||
|
|
||||||
from distutils import log
|
with warnings.catch_warnings():
|
||||||
from distutils.command.build_ext import build_ext
|
# bpo-41282 (PEP 632) deprecated distutils but setup.py still uses it
|
||||||
from distutils.command.build_scripts import build_scripts
|
warnings.filterwarnings("ignore", "The distutils package is deprecated",
|
||||||
from distutils.command.install import install
|
DeprecationWarning)
|
||||||
from distutils.command.install_lib import install_lib
|
|
||||||
from distutils.core import Extension, setup
|
from distutils import log
|
||||||
from distutils.errors import CCompilerError, DistutilsError
|
from distutils.command.build_ext import build_ext
|
||||||
from distutils.spawn import find_executable
|
from distutils.command.build_scripts import build_scripts
|
||||||
|
from distutils.command.install import install
|
||||||
|
from distutils.command.install_lib import install_lib
|
||||||
|
from distutils.core import Extension, setup
|
||||||
|
from distutils.errors import CCompilerError, DistutilsError
|
||||||
|
from distutils.spawn import find_executable
|
||||||
|
|
||||||
|
|
||||||
# Compile extensions used to test Python?
|
# Compile extensions used to test Python?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue