Skip to content

Commit

Permalink
tree-sitter-python requires manual install on arm macOS
Browse files Browse the repository at this point in the history
The tree-sitter-python on PyPI unfortunately doesn't include
the binaries for Arm based MacOS. As a result, the only way to
get it is from the github repo.

This change updates the instructions to advise the user how to
install this added dependency that won't get installed from pip
fetching from PyPI.

The requirements.txt is also updated to use PyPI in all cases
except if Arm based MacOS.

Signed-off-by: Eric Brown <eric.brown@securesauce.dev>
  • Loading branch information
ericwb committed Jul 31, 2024
1 parent c45aee1 commit d44235f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
6 changes: 6 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ To install precli (requires Python 3.12):
pip install precli
Note: If using arm based macOS, you'll also need to install this package:

.. code-block:: console
pip install git+https://github.com/tree-sitter/tree-sitter-python@v0.21.0
Run precli on a single test example:

.. code-block:: console
Expand Down
6 changes: 6 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ To install precli:
pip install precli
```

Note: If using arm based macOS, you'll also need to install this package:

```
pip install git+https://github.com/tree-sitter/tree-sitter-python@v0.21.0
```

## Usage

Run precli on a single test example:
Expand Down
7 changes: 4 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ignorelib==0.3.0
requests==2.32.3
sarif-om==1.0.4
jschema-to-python==1.2.3
git+https://github.com/tree-sitter/tree-sitter-go@v0.21.0
git+https://github.com/tree-sitter/tree-sitter-java@v0.21.0
git+https://github.com/tree-sitter/tree-sitter-python@v0.21.0
tree-sitter-go==0.21.0
tree-sitter-java==0.21.0
tree-sitter-python==0.21.0; sys_platform != "darwin" and platform_machine != "arm64"
git+https://github.com/tree-sitter/tree-sitter-python@v0.21.0; sys_platform == "darwin" and platform_machine == "arm64"

0 comments on commit d44235f

Please sign in to comment.