From 561e9ce1b511d96e336c7076592cc5d9c633ed41 Mon Sep 17 00:00:00 2001 From: bearsh Date: Tue, 3 Dec 2024 09:48:04 +0100 Subject: [PATCH] switch from distutils.spawn.find_executable to shutil.which The package distutils was removed in Python 3.12. We should instead be using which from the package shutil. --- puncover/puncover.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/puncover/puncover.py b/puncover/puncover.py index 5d8298c..6064c89 100755 --- a/puncover/puncover.py +++ b/puncover/puncover.py @@ -3,7 +3,7 @@ import argparse import os import webbrowser -from distutils.spawn import find_executable +from shutil import which from os.path import dirname from threading import Timer @@ -52,7 +52,7 @@ def get_arm_tools_prefix_path(): Note that we could instead use the '-print-prog-name=...' option to gcc, which returns the paths we need. For now stick with the hacky method here. """ - obj_dump = find_executable("arm-none-eabi-objdump") + obj_dump = which("arm-none-eabi-objdump") if not obj_dump: return None