Conversation
Replace setup.py with a PEP 621 pyproject.toml. - name: codehawk-binary (import name stays chb) - version read from chb/app/CHVersion.py - requires-python >=3.9 since six modules use builtin generics - no dependencies because the package is stdlib-only, - packages restricted to chb* - explicit package-data for bchsummaries.jar, bch_header.c, and the two opcodes_covered.json files that exist. ConfigLocal.py is gitignored local configuration that sits inside the package, so a wheel built from a working copy would embed a developer's absolute analyzer paths. This is excluded explicitly and release.yml builds from a fresh checkout. Also adds chb/py.typed, since the package is fully annotated and CI already runs mypy over it. The analyzer itself is deliberately not packaged: it is a separate OCaml build invoked over subprocess, and Config() keeps locating it through ConfigLocal.py.
leftbyte
marked this pull request as ready for review
September 24, 2026 22:08
waskyo
reviewed
Sep 25, 2026
waskyo
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for putting this together.
| build: | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - uses: actions/checkout@v4 |
Collaborator
There was a problem hiding this comment.
can we use the latest version of these actions? checkout, setup-python and upload-artifacts are all up to 7. no clue about download-artifact or the other ones.
| readme = "README.md" | ||
| license = "MIT" | ||
| license-files = ["LICENSE"] | ||
| requires-python = ">=3.9" |
Collaborator
There was a problem hiding this comment.
README.md says 3.5?
https://github.com/leftbyte/CodeHawk-Binary/blob/master/README.md#requirements
| The distribution contains the python API only. Running an analysis additionally | ||
| needs the analyzer itself (`chx86_analyze`, `parseFile`), which is built from the | ||
| [CodeHawk](https://github.com/static-analysis-engineering/codehawk) repository; | ||
| copy `chb/util/ConfigLocal.template` to `chb/util/ConfigLocal.py` and point it at |
Collaborator
There was a problem hiding this comment.
The Requirements section of the README already covers installation. Let's skip these shortened/duplicated instructions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These changes support the publishing of the CodeHawk-Binary python bindings to PyPI.org. After review and commit of these changes, a maintainer on CodeHawk-Binary needs to:
Create two GitHub environments (Settings -> Environments), named exactly:
pypitestpypiAdd required reviewers to
pypi, which makes a release need one approval click. Optionally restrict them to protected tags.Do a dry run: Actions -> release -> "Run workflow", tick
Then
pip install -i https://test.pypi.org/simple/ codehawk-binaryin a scratch venv. TestPyPI keeps every version it has seen, so a second dry run of the same version fails; bumpchbversionor accept one shot.chbversioninchb/app/CHVersion.pyv<version>and push the tagpypienvironment when Actions asksNOTE: PEP 440 renders the current
0.3.0-20260901as0.3.0.post20260901. A plain0.3.1or0.4.0would read better on PyPI; changing that string ispreferable to introducing a second version source.
The pypi.org and test.pypi.ogrg PIPY accounts have been registered and configured: