-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: move metadata to pyproject.toml
- Loading branch information
1 parent
bc59e3c
commit 92a8d3b
Showing
2 changed files
with
41 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,34 @@ | ||
[build-system] | ||
requires = ["setuptools>=43.0.0", "wheel>=0.36.2"] | ||
requires = ["setuptools>=43"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "tree_sitter" | ||
version = "0.21.0" | ||
description = "Python bindings for the Tree-Sitter parsing library" | ||
classifiers = [ | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: C", | ||
"Programming Language :: Python", | ||
"Topic :: Software Development :: Compilers", | ||
"Topic :: Text Processing :: Linguistic", | ||
"Typing :: Typed" | ||
] | ||
requires-python = ">=3.8" | ||
readme = "README.md" | ||
|
||
[project.urls] | ||
Homepage = "https://tree-sitter.github.io/tree-sitter/" | ||
Source = "https://github.com/tree-sitter/py-tree-sitter" | ||
|
||
[[project.authors]] | ||
name = "Max Brunsfeld" | ||
email = "[email protected]" | ||
|
||
[tool.ruff] | ||
line-length = 100 | ||
|
||
[tool.ruff.pycodestyle] | ||
max-line-length = 102 | ||
max-line-length = 100 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,45 +2,29 @@ | |
Py-Tree-sitter | ||
""" | ||
|
||
from os import path | ||
from platform import system | ||
|
||
from setuptools import Extension, setup | ||
|
||
with open(path.join(path.dirname(__file__), "README.md")) as f: | ||
LONG_DESCRIPTION = f.read() | ||
|
||
setup( | ||
name="tree_sitter", | ||
version="0.20.4", | ||
maintainer="Max Brunsfeld", | ||
maintainer_email="[email protected]", | ||
author="Max Brunsfeld", | ||
author_email="[email protected]", | ||
url="https://github.com/tree-sitter/py-tree-sitter", | ||
license="MIT", | ||
platforms=["any"], | ||
python_requires=">=3.3", | ||
description="Python bindings for the Tree-Sitter parsing library", | ||
long_description=LONG_DESCRIPTION, | ||
long_description_content_type="text/markdown", | ||
classifiers=[ | ||
"License :: OSI Approved :: MIT License", | ||
"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"]}, | ||
package_data={ | ||
"tree_sitter": ["py.typed", "*.pyi"] | ||
}, | ||
ext_modules=[ | ||
Extension( | ||
"tree_sitter.binding", | ||
["tree_sitter/core/lib/src/lib.c", "tree_sitter/binding.c"], | ||
include_dirs=["tree_sitter/core/lib/include", "tree_sitter/core/lib/src"], | ||
name="tree_sitter.binding", | ||
sources=[ | ||
"tree_sitter/core/lib/src/lib.c", | ||
"tree_sitter/binding.c" | ||
], | ||
include_dirs=[ | ||
"tree_sitter/core/lib/include", | ||
"tree_sitter/core/lib/src" | ||
], | ||
extra_compile_args=( | ||
["-std=c99", "-Wno-unused-variable"] if system() != "Windows" else None | ||
["-std=gnu11", "-Wno-unused-variable"] if system() != "Windows" else None | ||
), | ||
) | ||
], | ||
project_urls={"Source": "https://github.com/tree-sitter/py-tree-sitter"}, | ||
] | ||
) |