Capstone can't be built on 3.12 due to distutils removal
The python bindings rely on classical distutils, which is removed in 3.12. In order to work on newer versions of python the setup.py file must be migrated to use setuputils instead.
Should also be patched in 5.0.x series: https://github.com/capstone-engine/capstone/issues/2081
Call me crazy but I'm looking at current next e3a2b4c4183b4eb5b1ade576aeb3c4e7ccc5f20f and the setup.py file still leverages distutils... you're saying it will be addressed in the 5 series? The messaged implied that it was patched in 5.x
@rickmark no, I meant the fix should be cherry-picked to the capstone 5.x once it landed in next.
@rickmark no, I meant the fix should be cherry-picked to the capstone 5.x once it landed in
next.
Thank you for the clarity! I've been noodling on how to accomplish this PR anyway, the short answer is there might need to be a specialized capstone_builder.py module that gets integrated into the process to do the make of the libcapstone before. setuptools doesn't have great options for adding build phases/external build systems from my reading.
One element of note, I did submit a PR to use cmake on macOS as it can build libcapstone.dylib FAT (arm64/x86_64). Might it be wise to just use it for all build paths and deprecate / remove classical makefile based builds?
I'd love it! @kabeor has the last say with this.
This is needed for the 6.0.0 release as well. @kabeor
Yes, it's time to add a new python build system:) Seems there still some works need to do before releasing. I'm welling to check out this once I finished my busy work recently😄
Definitely needs an update. __init__.py is using distutils.sysconfig which breaks 3.12 installs.
Also, current release v5.0.1 won't work for 3.12.x versions.