Closed dgarijo closed 1 year ago
Oh, and also change the corresponding test file
Done in the new pull request, if anything, let me know, on it ASAP
The PR has conflicting files. You should pull the latest version of the repository, not from your previous fork
In MacOS, we have the following error:
Solution: We need to create a
.so
file for mac. Steps (following this doc: https://github.com/tree-sitter/py-tree-sitter#usage):Language.build_library(
Store the library in the
build
directory'my-languages.so',
Include one or more languages
[ 'path_to_cloned_repo/tree-sitter-python' ] )
if sys.platform.startswith("win") or sys.platform.startswith("cygwin"): language = Language(path_to_languages + os.path.sep + "python_win.so", "python") else: language = Language(path_to_languages + os.path.sep + "python_unix.so", "python")
if sys.platform.startswith("win") or sys.platform.startswith("cygwin"): language = Language(path_to_languages + os.path.sep + "python_win.so", "python") elif sys.platform.startswith("darwin"): language = Language(path_to_languages + os.path.sep + "python_macOS.so", "python") else: language = Language(path_to_languages + os.path.sep + "python_unix.so", "python")