This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This repo packages Capstone 6.0.0-Alpha7 as a Python package named capstone6pwndbg (renamed from the upstream capstone to avoid conflicts), intended for use by the pwndbg debugger.
The actual Capstone source lives in the capstone/ git submodule — do not modify it directly. The only root-level files that matter here are:
python-rename.patch— renames the Python package fromcapstonetocapstone6pwndbgin the submodule'ssetup.py.github/workflows/publish.yml— builds and publishes wheels to PyPI
git submodule update --init --recursive
cd ./capstone && git apply ../python-rename.patch && cd ..
uv build --out-dir dist ./capstone/bindings/pythonReleases are triggered by pushing a v* tag. The workflow (.github/workflows/publish.yml) uses cibuildwheel 3.3.1 to build binary wheels for Linux (x86_64, aarch64), macOS (x86_64, arm64), and publishes via twine with PyPI trusted publishing (OIDC). A separate sdist job builds and publishes a source distribution.
This repo has no source code of its own. Its only purpose is:
- Pin the
capstonesubmodule to a specific version. - Apply
python-rename.patchto rename the published package. - Drive CI to build and publish wheels to PyPI.
-
Fetch new tags in the submodule and check out the new tag:
cd capstone git fetch --tags git checkout <new-tag> # e.g. 6.0.0-Alpha8 cd ..
-
Verify the patch still applies cleanly:
git apply --check python-rename.patch
If it fails, update
python-rename.patchaccordingly (regenerate the affected hunks withgit diff). -
Stage and commit the changes in the root repo:
git add capstone python-rename.patch git commit -m "Bump capstone to <new-tag>" -
Update the version string in
CLAUDE.md(Overview section). -
Push a
v*tag to trigger CI and publish to PyPI:git tag v<new-tag> git push origin main --tags