1From bcc65c0be18fc6ea6ec39da89d0de77544fa18c7 Mon Sep 17 00:00:00 2001
2From: Mrmaxmeier <Mrmaxmeier@gmail.com>
3Date: Tue, 9 Jul 2024 17:41:08 +0200
4Subject: [PATCH] Drop removed `distutils` import in favor of `sysconfig`
5
6This patch is available online as https://github.com/unicorn-engine/unicorn/pull/1973
7
8diff --git a/unicorn/unicorn.py b/unicorn/unicorn.py
9index 2e6a938f43..7204b8215f 100644
10--- a/unicorn/unicorn.py
11+++ b/unicorn/unicorn.py
12@@ -2,7 +2,7 @@
13 from __future__ import annotations
14 import ctypes
15 import ctypes.util
16-import distutils.sysconfig
17+import sysconfig
18 from functools import wraps
19 from typing import Any, Callable, List, Tuple, Union
20 import pkg_resources
21@@ -85,7 +85,7 @@ def _load_lib(path, lib_name):
22 pkg_resources.resource_filename(__name__, 'lib'),
23 os.path.join(os.path.split(__file__)[0], 'lib'),
24 '',
25- distutils.sysconfig.get_python_lib(),
26+ sysconfig.get_path('platlib'),
27 "/usr/local/lib/" if sys.platform == 'darwin' else '/usr/lib64',
28 os.getenv('PATH', '')]
29