Skip to content

Commit

Permalink
fix: add setuptools in dependencies for 3.12+
Browse files Browse the repository at this point in the history
  • Loading branch information
GabDug committed Oct 5, 2023
1 parent 7c9fded commit 1065b89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
"Topic :: Software Development :: Compilers",
"Topic :: Text Processing :: Linguistic",
],
install_requires=[
"setuptools>=60.0.0; python_version>='3.12'"
],
packages=["tree_sitter"],
package_data={"tree_sitter": ["py.typed", "*.pyi"]},
ext_modules=[
Expand Down
9 changes: 2 additions & 7 deletions tree_sitter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@

import enum
from ctypes import c_void_p, cdll
try:
from distutils.ccompiler import new_compiler
from distutils.unixccompiler import UnixCCompiler
except ImportError:
from setuptools._distutils.ccompiler import new_compiler
from setuptools._distutils.unixccompiler import UnixCCompiler

from distutils.ccompiler import new_compiler
from distutils.unixccompiler import UnixCCompiler
from os import path
from platform import system
from tempfile import TemporaryDirectory
Expand Down

0 comments on commit 1065b89

Please sign in to comment.