From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> The configure() function in setuptools.logging has been available since v61.0.0 release so for over 2,5 years. We can generally expect users of python bindings to be using relatively recent versions of required dependencies. At the same time distutils has long been deprecated. Let's keep the try: guard for setuptools.logging.configure but instead of importing distutils if the former is unavailable, just do nothing and drop the deprecated import altogether. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> --- bindings/python/build_tests.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bindings/python/build_tests.py b/bindings/python/build_tests.py index 1760257..bfdc4c0 100644 --- a/bindings/python/build_tests.py +++ b/bindings/python/build_tests.py @@ -2,8 +2,8 @@ # SPDX-FileCopyrightText: 2023 Phil Howard <phil@xxxxxxxxxxxxx> """ -Bring up just enough of setuptools/distutils in order to build the gpiod -test module C extensions. +Bring up just enough of setuptools in order to build the gpiod test +module C extensions. Set "build_temp" and "build_lib" so that our source directory is not polluted with artefacts in build/ @@ -81,10 +81,8 @@ try: from setuptools.logging import configure configure() -except ImportError: - from distutils.log import DEBUG, set_verbosity - - set_verbosity(DEBUG) +except: + pass with tempfile.TemporaryDirectory(prefix="libgpiod-") as temp_dir: command = build_ext(dist) -- 2.45.2