Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use proper Python package for tree-sitter-zeek #72

Merged
merged 4 commits into from
Jun 21, 2024

Conversation

bbannier
Copy link
Member

No description provided.

@bbannier bbannier self-assigned this May 16, 2024
.pre-commit-config.yaml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@bbannier bbannier force-pushed the topic/bbannier/tree-sitter-zeek-package branch 2 times, most recently from 8c9c78e to 3c76b51 Compare May 16, 2024 18:17
zeekscript/script.py Show resolved Hide resolved
.github/workflows/build_wheels.yml Outdated Show resolved Hide resolved
@bbannier bbannier force-pushed the topic/bbannier/tree-sitter-zeek-package branch 2 times, most recently from 2949791 to 2d6a200 Compare May 16, 2024 20:16
@bbannier bbannier force-pushed the topic/bbannier/tree-sitter-zeek-package branch from 2d6a200 to 151dab5 Compare May 21, 2024 08:41
bbannier added a commit to zeek/tree-sitter-zeek that referenced this pull request Jun 19, 2024
Since 1c279c4 this package contains everything needed for it to be
used on its own, e.g., downstream consumers like
https://github.com/zeek/zeekscript/ can directly depend on this package
and would not need to perform manual building of the parser anymore, see
zeek/zeekscript#72. The only missing piece, at least in the Python
ecosystem, was that before zeek/zeekscript#72 that package would publish
wheels so users could install the tool without needing e.g., a C
compiler. With parser compilation moved from zeek/zeekscript into
tree-sitter-zeek zeekscript does not need to build any wheels anymore
(it is a source-only package); instead we should provide wheels for
tree-sitter-zeek which this patch implements.

Note: The action I used here can also publish packages for NPM and Rust
crates. These ecosystems are much more comfortable with requiring a
compiler, so I deliberately did not set this up.
@bbannier bbannier marked this pull request as ready for review June 19, 2024 14:25
@bbannier bbannier requested a review from awelzel June 19, 2024 14:25
@bbannier bbannier force-pushed the topic/bbannier/tree-sitter-zeek-package branch from 254b62a to 2c244f5 Compare June 19, 2024 14:30
@bbannier bbannier requested review from ckreibich and removed request for awelzel June 19, 2024 15:23
@bbannier bbannier force-pushed the topic/bbannier/tree-sitter-zeek-package branch from c798197 to 72a49af Compare June 19, 2024 20:00
This patch largely empties out `setup.py` and instead uses keys
corresponding keys `pyproject.toml`. The only remaining use we have for
`setup.py` is to build Python bindings for tree-sitter-zeek and to
compute a dynamic version from the `VERSION` file tracked in the repo.
tree-sitter-zeek now provides a Python package we can directly depend
on. With this we can avoid building and shipping the generated
tree-sitter bindings. By using the "official upstream API" we can also
simplify the way we parse input.
With tree-sitter-zeek providing a proper Python package this project is
script-only.
@bbannier bbannier force-pushed the topic/bbannier/tree-sitter-zeek-package branch from 72a49af to 8a6f557 Compare June 21, 2024 08:49
@bbannier bbannier merged commit 96ed60b into main Jun 21, 2024
7 checks passed
@bbannier bbannier deleted the topic/bbannier/tree-sitter-zeek-package branch June 21, 2024 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants