Skip to content

Latest commit

 

History

History
60 lines (44 loc) · 2.16 KB

File metadata and controls

60 lines (44 loc) · 2.16 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Overview

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 from capstone to capstone6pwndbg in the submodule's setup.py
  • .github/workflows/publish.yml — builds and publishes wheels to PyPI

Build

git submodule update --init --recursive
cd ./capstone && git apply ../python-rename.patch && cd ..
uv build --out-dir dist ./capstone/bindings/python

CI / Release

Releases 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.

Architecture

This repo has no source code of its own. Its only purpose is:

  1. Pin the capstone submodule to a specific version.
  2. Apply python-rename.patch to rename the published package.
  3. Drive CI to build and publish wheels to PyPI.

Bumping the Capstone version

  1. 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 ..
  2. Verify the patch still applies cleanly:

    git apply --check python-rename.patch

    If it fails, update python-rename.patch accordingly (regenerate the affected hunks with git diff).

  3. Stage and commit the changes in the root repo:

    git add capstone python-rename.patch
    git commit -m "Bump capstone to <new-tag>"
  4. Update the version string in CLAUDE.md (Overview section).

  5. Push a v* tag to trigger CI and publish to PyPI:

    git tag v<new-tag>
    git push origin main --tags