mirror of
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
synced 2026-10-25 12:39:18 +03:00
The presence of _distutils in setuptools is an implementation detail. If we want anything from the distutils package, we should import it directly. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
18 lines
513 B
Python
18 lines
513 B
Python
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
# SPDX-FileCopyrightText: 2022 Bartosz Golaszewski <brgl@bgdev.pl>
|
|
|
|
import os
|
|
import unittest
|
|
|
|
from distutils.version import LooseVersion
|
|
|
|
required_kernel_version = LooseVersion("5.19.0")
|
|
current_version = LooseVersion(os.uname().release.split("-")[0])
|
|
|
|
if current_version < required_kernel_version:
|
|
raise NotImplementedError(
|
|
"linux kernel version must be at least {} - got {}".format(
|
|
required_kernel_version, current_version
|
|
)
|
|
)
|