[x] I've documented or updated the documentation of every API function and struct this PR changes.
[x] I've added tests that prove my fix is effective or that my feature works (if possible)
Detailed description
Right now installation fails on python 3.12 because distutils was removed. distutils are currently provided through the setuptools package. Using a pyproject.toml will tell modern python build tools to install setuptools prior to building capstone. I saw there is a separate PR to remove distutils, this is mostly orthogonal to that.
Once merged, I would like this cherry-picked to the v5 branch as well.
...
Test plan
Test that it builds and installs correctly on python 3.12. I've added an entry to the CI to ensure this.
Your checklist for this pull request
Detailed description
Right now installation fails on python 3.12 because distutils was removed. distutils are currently provided through the setuptools package. Using a pyproject.toml will tell modern python build tools to install setuptools prior to building capstone. I saw there is a separate PR to remove distutils, this is mostly orthogonal to that.
Once merged, I would like this cherry-picked to the v5 branch as well.
...
Test plan
Test that it builds and installs correctly on python 3.12. I've added an entry to the CI to ensure this.
...
Closing issues
Closes #2223 ...