From: whitequark Date: Fri, 8 Oct 2021 17:48:00 +0000 (+0000) Subject: _toolchain.cxx: ignore deprecation warning (on Python 3.6). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5c3e6e6c16023609cb02e7461dcd500e66e14196;p=nmigen.git _toolchain.cxx: ignore deprecation warning (on Python 3.6). This code really shouldn't be using distutils, but for now this will have to do. --- diff --git a/nmigen/_toolchain/cxx.py b/nmigen/_toolchain/cxx.py index 430fb14..c43ffbc 100644 --- a/nmigen/_toolchain/cxx.py +++ b/nmigen/_toolchain/cxx.py @@ -1,7 +1,13 @@ import tempfile import sysconfig +import warnings import os.path -from setuptools import distutils + + +with warnings.catch_warnings(): + warnings.filterwarnings(action="ignore", category=DeprecationWarning) + # this causes a DeprecationWarning on Python 3.6 (but not later) + from setuptools import distutils __all__ = ["build_cxx"]