From 828843738eb89dcbae66622cb19bb54b390907dc Mon Sep 17 00:00:00 2001 From: Martin Rys Date: Sat, 21 Sep 2024 20:41:11 +0200 Subject: [PATCH] run.sh: Fix using deprecated pkgutil --- run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run.sh b/run.sh index 8c9510d4..95325a94 100755 --- a/run.sh +++ b/run.sh @@ -54,11 +54,11 @@ function testDeps() { echo -e "${Red}python3-libusb1 not found, install it. ${Yellow}The package may be named python-libusb1 on your distribution!${NoColor}" exit 1 fi - if ! python -c "import pkgutil; exit(0 if pkgutil.find_loader('setuptools') else 1)"; then + if ! python -c "import importlib.util; exit(0 if importlib.util.find_spec('setuptools') else 1)"; then echo -e "${Red}python3-setuptools not found, install it. ${Yellow}The package may be named python-setuptools on your distribution!${NoColor}" exit 1 fi - if ! python -c "import pkgutil; exit(0 if pkgutil.find_loader('gi') else 1)"; then + if ! python -c "import importlib.util; exit(0 if importlib.util.find_spec('gi') else 1)"; then echo -e "${Red}python3-gi not found, install it. ${Yellow}The package may be named python-gi on your distribution!${NoColor}" exit 1 fi