Skip to main content

Python bindings to the Tree-sitter parsing library

Project description

py-tree-sitter-builds

The py-tree-sitter project (not to be confused with tree-sitter-python) provides Python bindings for the awesome tree-sitter parsing library. The documentation of py-tree-sitter says that you need to have a C compiler installed to use it, but installing a C compiler can be highly non-trivial depending on which operating system you have. It's also a huge dependency for what is otherwise a small and simple parsing library.

This project lets you use py-tree-sitter without a C compiler by providing binary wheels that were built using a C compiler, but don't require a C compiler to be installed. The wheels contain:

Installation

$ pip install tree-sitter-builds

After installing, import tree_sitter and import tree_sitter_languages should work. For documentation, see the documentation of:

How does it work?

Read .github/workflows/build.yml to see how GitHub actions builds the wheels. Here are the steps, at a high level:

  • Download py-tree-sitter v0.20.1 and py-tree-sitter-languages v1.5.0 from GitHub (these are the latest released versions at the time of writing this)
  • Move downloaded files to the correct places, so that the resulting wheels will contain both tree_sitter and tree_sitter_languages
  • Apply patches to the tests of tree_sitter and tree_sitter_languages so that they work here
  • Invoke cibuildwheel with the same configuration as py-tree-sitter-languages uses
  • Once the above steps have ran on Windows, MacOS and Linux, upload the wheels to PyPI

License

The wheels consist of various parts licensed under MIT and Apache 2.0 licenses:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

tree_sitter_builds-2023.3.12-cp311-cp311-win_amd64.whl (5.2 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

tree_sitter_builds-2023.3.12-cp311-cp311-win32.whl (5.2 MB view hashes)

Uploaded CPython 3.11 Windows x86

tree_sitter_builds-2023.3.12-cp311-cp311-musllinux_1_1_x86_64.whl (6.2 MB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

tree_sitter_builds-2023.3.12-cp311-cp311-musllinux_1_1_i686.whl (6.4 MB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ i686

tree_sitter_builds-2023.3.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.7 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

tree_sitter_builds-2023.3.12-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (5.8 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ i686

tree_sitter_builds-2023.3.12-cp311-cp311-macosx_10_9_x86_64.whl (5.6 MB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

tree_sitter_builds-2023.3.12-cp310-cp310-win_amd64.whl (5.2 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

tree_sitter_builds-2023.3.12-cp310-cp310-win32.whl (5.2 MB view hashes)

Uploaded CPython 3.10 Windows x86

tree_sitter_builds-2023.3.12-cp310-cp310-musllinux_1_1_x86_64.whl (6.2 MB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

tree_sitter_builds-2023.3.12-cp310-cp310-musllinux_1_1_i686.whl (6.4 MB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ i686

tree_sitter_builds-2023.3.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.7 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

tree_sitter_builds-2023.3.12-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (5.8 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ i686

tree_sitter_builds-2023.3.12-cp310-cp310-macosx_10_9_x86_64.whl (5.6 MB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

tree_sitter_builds-2023.3.12-cp39-cp39-win_amd64.whl (5.2 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

tree_sitter_builds-2023.3.12-cp39-cp39-win32.whl (5.2 MB view hashes)

Uploaded CPython 3.9 Windows x86

tree_sitter_builds-2023.3.12-cp39-cp39-musllinux_1_1_x86_64.whl (6.2 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

tree_sitter_builds-2023.3.12-cp39-cp39-musllinux_1_1_i686.whl (6.4 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

tree_sitter_builds-2023.3.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.7 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

tree_sitter_builds-2023.3.12-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (5.8 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ i686

tree_sitter_builds-2023.3.12-cp39-cp39-macosx_10_9_x86_64.whl (5.6 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

tree_sitter_builds-2023.3.12-cp38-cp38-win_amd64.whl (5.2 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

tree_sitter_builds-2023.3.12-cp38-cp38-win32.whl (5.2 MB view hashes)

Uploaded CPython 3.8 Windows x86

tree_sitter_builds-2023.3.12-cp38-cp38-musllinux_1_1_x86_64.whl (6.3 MB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

tree_sitter_builds-2023.3.12-cp38-cp38-musllinux_1_1_i686.whl (6.4 MB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ i686

tree_sitter_builds-2023.3.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.7 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

tree_sitter_builds-2023.3.12-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl (5.8 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ i686

tree_sitter_builds-2023.3.12-cp38-cp38-macosx_10_9_x86_64.whl (5.6 MB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

tree_sitter_builds-2023.3.12-cp37-cp37m-win_amd64.whl (5.2 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

tree_sitter_builds-2023.3.12-cp37-cp37m-win32.whl (5.2 MB view hashes)

Uploaded CPython 3.7m Windows x86

tree_sitter_builds-2023.3.12-cp37-cp37m-musllinux_1_1_x86_64.whl (6.2 MB view hashes)

Uploaded CPython 3.7m musllinux: musl 1.1+ x86-64

tree_sitter_builds-2023.3.12-cp37-cp37m-musllinux_1_1_i686.whl (6.4 MB view hashes)

Uploaded CPython 3.7m musllinux: musl 1.1+ i686

tree_sitter_builds-2023.3.12-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.7 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

tree_sitter_builds-2023.3.12-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl (5.8 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ i686

tree_sitter_builds-2023.3.12-cp37-cp37m-macosx_10_9_x86_64.whl (5.6 MB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

tree_sitter_builds-2023.3.12-cp36-cp36m-win_amd64.whl (5.2 MB view hashes)

Uploaded CPython 3.6m Windows x86-64

tree_sitter_builds-2023.3.12-cp36-cp36m-win32.whl (5.2 MB view hashes)

Uploaded CPython 3.6m Windows x86

tree_sitter_builds-2023.3.12-cp36-cp36m-musllinux_1_1_x86_64.whl (6.2 MB view hashes)

Uploaded CPython 3.6m musllinux: musl 1.1+ x86-64

tree_sitter_builds-2023.3.12-cp36-cp36m-musllinux_1_1_i686.whl (6.4 MB view hashes)

Uploaded CPython 3.6m musllinux: musl 1.1+ i686

tree_sitter_builds-2023.3.12-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.7 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

tree_sitter_builds-2023.3.12-cp36-cp36m-manylinux_2_17_i686.manylinux2014_i686.whl (5.8 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ i686

tree_sitter_builds-2023.3.12-cp36-cp36m-macosx_10_9_x86_64.whl (5.6 MB view hashes)

Uploaded CPython 3.6m macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page