Created
April 2, 2025 03:51
-
-
Save sydowma/8b443acaa83fd754043949aa1e02f54a to your computer and use it in GitHub Desktop.
tree-sitter-languages_setup.sh
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
#!/bin/bash | |
# install.sh - Installation script for tree-sitter-languages setup | |
# Exit on any error | |
set -e | |
echo "Starting installation process..." | |
# Install required Python packages | |
echo "Installing Python dependencies..." | |
pip install Cython setuptools tree-sitter==0.21.3 wheel | |
# Download and extract tree-sitter-languages | |
echo "Downloading tree-sitter-languages v1.10.2..." | |
curl -L -o tree-sitter-languages-1.10.2.tar.gz https://github.com/grantjenks/py-tree-sitter-languages/archive/refs/tags/v1.10.2.tar.gz | |
echo "Extracting files..." | |
tar -x -f tree-sitter-languages-1.10.2.tar.gz | |
# Build the package | |
echo "Building the package..." | |
cd py-tree-sitter-languages-1.10.2 | |
python build.py | |
cd .. | |
# Install the package in editable mode | |
echo "Installing the package..." | |
pip install -e py-tree-sitter-languages-1.10.2 | |
# Cleanup | |
echo "Cleaning up..." | |
rm -f tree-sitter-languages-1.10.2.tar.gz | |
echo "Installation completed successfully!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment