[build-system]
requires = ["setuptools>=61", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "sari"
dynamic = ["version"]
description = "Sari - Local Search MCP Server"
readme = "README.md"
requires-python = ">=3.9"
license = "Apache-2.0"
license-files = ["LICENSE", "NOTICE"]
authors = [
  { name = "Horadric" }
]
dependencies = [
  "watchdog>=2.0.0",
  "orjson>=3.10.0",
  "psutil>=5.0.0",
]

[project.optional-dependencies]
# 한중일 검색 지원
cjk = [
  "lindera-python-ipadic",
]

# 고정밀 코드 분석
treesitter = [
  "tree-sitter",
  "tree-sitter-python",
  "tree-sitter-javascript",
  "tree-sitter-typescript",
  "tree-sitter-java",
  "tree-sitter-go",
  "tree-sitter-rust",
  "tree-sitter-cpp",
]

# 전체 기능 (모든 의존성 포함)
full = [
  "lindera-python-ipadic",
  "tree-sitter",
  "tree-sitter-python",
  "tree-sitter-javascript",
  "tree-sitter-typescript",
  "tree-sitter-java",
  "tree-sitter-go",
  "tree-sitter-rust",
  "tree-sitter-cpp",
  "tantivy==0.25.1",
]

# embedded engine
engine = [
  "tantivy==0.25.1",
  "lindera-python-ipadic",
]

[project.scripts]
sari = "sari.main:main"

[tool.setuptools]
packages = { find = { include = ["sari", "sari.*"] } }

[tool.setuptools.package-data]
sari = ["*.sql", "*.md", "core/static/*"]

[tool.setuptools.dynamic]
version = { attr = "sari.version.__version__" }
