All of lore.kernel.org
 help / color / mirror / Atom feed
* [libgpiod][PATCH 1/9] bindings: python: build_tests: do not fallback to distutils
@ 2026-04-01  0:14 Vincent Fazio
  2026-04-01  0:14 ` [libgpiod][PATCH 2/9] bindings: python: build_tests: simplify the Distribution Vincent Fazio
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Vincent Fazio @ 2026-04-01  0:14 UTC (permalink / raw)
  To: linux-gpio; +Cc: Vincent Fazio

Make the assumption that the build host has setuptools>=60.2.0 which
exposes the logging module and remove references to distutils.

This conforms to setuptools' logging recommendation [0].

[0]: https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html#prefer-setuptools
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
---
 bindings/python/build_tests.py | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/bindings/python/build_tests.py b/bindings/python/build_tests.py
index ebe1727..6375b29 100644
--- a/bindings/python/build_tests.py
+++ b/bindings/python/build_tests.py
@@ -19,9 +19,11 @@ import glob
 import tempfile
 from os import getenv, path
 
-from setuptools import Distribution, Extension
+from setuptools import Distribution, Extension, logging
 from setuptools.command.build_ext import build_ext
 
+logging.configure()
+
 TOP_SRCDIR = getenv("TOP_SRCDIR", "../../")
 TOP_BUILDDIR = getenv("TOP_BUILDDIR", "../../")
 
@@ -77,19 +79,6 @@ dist = Distribution(
     }
 )
 
-try:
-    from setuptools.logging import configure
-
-    configure()
-except ImportError:
-    try:
-        from distutils.log import DEBUG, set_verbosity
-
-        set_verbosity(DEBUG)
-    except ImportError:
-        # We can still build the tests, it will just be very quiet.
-        pass
-
 with tempfile.TemporaryDirectory(prefix="libgpiod-") as temp_dir:
     command = build_ext(dist)
     command.inplace = True
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2026-04-03 13:09 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-01  0:14 [libgpiod][PATCH 1/9] bindings: python: build_tests: do not fallback to distutils Vincent Fazio
2026-04-01  0:14 ` [libgpiod][PATCH 2/9] bindings: python: build_tests: simplify the Distribution Vincent Fazio
2026-04-01  0:14 ` [libgpiod][PATCH 3/9] bindings: python: setup: add type annotations Vincent Fazio
2026-04-01  0:14 ` [libgpiod][PATCH 4/9] bindings: python: setup: apply linter recommendations Vincent Fazio
2026-04-01  0:14 ` [libgpiod][PATCH 5/9] bindings: python: setup: use logging module Vincent Fazio
2026-04-01  0:14 ` [libgpiod][PATCH 6/9] bindings: python: examples: add type annotations Vincent Fazio
2026-04-01  0:14 ` [libgpiod][PATCH 7/9] bindings: python: examples: apply linter recommendations Vincent Fazio
2026-04-01  0:14 ` [libgpiod][PATCH 8/9] bindings: python: add a lint dependency group Vincent Fazio
2026-04-01  0:14 ` [libgpiod][PATCH 9/9] bindings: python: update linter configuration Vincent Fazio
2026-04-02 14:37   ` Bartosz Golaszewski
2026-04-02 15:55     ` Vincent Fazio
2026-04-02 16:42       ` Bartosz Golaszewski
2026-04-02 17:01         ` Vincent Fazio
2026-04-03  9:02           ` Bartosz Golaszewski
2026-04-03 13:09             ` Vincent Fazio
2026-04-03  9:01 ` [libgpiod][PATCH 1/9] bindings: python: build_tests: do not fallback to distutils Bartosz Golaszewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.