Skip to content

Commit

Permalink
chore: remove usage of distutils
Browse files Browse the repository at this point in the history
distutils has been removed in python 3.12
  • Loading branch information
mayeut committed Sep 8, 2023
1 parent fc1af45 commit f8a6340
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/auditwheel/patcher.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from __future__ import annotations

import re
from distutils.spawn import find_executable
from itertools import chain
from shutil import which
from subprocess import CalledProcessError, check_call, check_output


Expand All @@ -23,9 +23,9 @@ def get_rpath(self, file_name: str) -> str:
def _verify_patchelf() -> None:
"""This function looks for the ``patchelf`` external binary in the PATH,
checks for the required version, and throws an exception if a proper
version can't be found. Otherwise, silcence is golden
version can't be found. Otherwise, silence is golden
"""
if not find_executable("patchelf"):
if not which("patchelf"):
raise ValueError("Cannot find required utility `patchelf` in PATH")
try:
version = check_output(["patchelf", "--version"]).decode("utf-8")
Expand Down

0 comments on commit f8a6340

Please sign in to comment.