[libgpiod][PATCH 5/9] bindings: python: setup: use logging module

Vincent Fazio
2026-04-01T00:18:08Z

Use the `logging` module to conform to setuptools' recommendations [0].

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

diff --git a/bindings/python/setup.py b/bindings/python/setup.py
index 5f5950e..cd50a8c 100644
--- a/bindings/python/setup.py
+++ b/bindings/python/setup.py
@@ -2,18 +2,20 @@
# SPDX-FileCopyrightText: 2022 Bartosz Golaszewski <brgl@bgdev.pl>

from collections.abc import Callable
+from logging import getLogger
from os import getenv, path, unlink
from shutil import copy, copytree, rmtree
from typing import TypeVar, cast

from setuptools import Extension, setup
from setuptools.command.build_ext import build_ext as orig_build_ext
-from setuptools.command.sdist import log
from setuptools.command.sdist import sdist as orig_sdist
from setuptools.errors import BaseError

T = TypeVar("T", "sdist", "build_ext")

+log = getLogger(__name__)
+
LINK_SYSTEM_LIBGPIOD = getenv("LINK_SYSTEM_LIBGPIOD") == "1"
LIBGPIOD_MINIMUM_VERSION = "2.1"
LIBGPIOD_VERSION = getenv("LIBGPIOD_VERSION")
--
2.43.0