Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1059671: python3-capstone: Python 3.12 has no module named 'distutils'

138 views
Skip to first unread message

Graham Inggs

unread,
Feb 2, 2024, 2:00:05 AM2/2/24
to
Control: tags -1 + patch

Hi Maintainer

It turns out the usage of distutils.sysconfig.get_python_lib() was
already patched out in a previous patch [1].

I believe all that is required here is patching out the import of
distutils.sysconfig:

--- a/bindings/python/capstone/__init__.py
+++ b/bindings/python/capstone/__init__.py
@@ -263,7 +263,6 @@

import ctypes, ctypes.util
from os.path import split, join, dirname
-import distutils.sysconfig

import inspect
if not hasattr(sys.modules[__name__], '__file__'):

...and dropping the dependency on python3-distutils:

--- a/debian/control
+++ b/debian/control
@@ -66,7 +67,6 @@
Section: python
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, libcapstone4,
- python3-distutils
XB-Python3-Version: ${python:Versions}
Description: lightweight multi-architecture disassembly framework -
Python bindings
Capstone is a lightweight multi-platform, multi-architecture disassembly

Regards
Graham


[1] https://salsa.debian.org/pkg-security-team/capstone/-/blob/debian/4.0.2-5/debian/patches/0001-Remove-magic-for-loading-shared-libraries.patch?ref_type=tags#L57
0 new messages