[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "mcp-document-converter"
version = "0.1.2"
description = "MCP Document Converter - 支持多格式文档转换的 MCP 工具"
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
keywords = ["mcp", "document", "converter", "markdown", "pdf", "docx", "html"]
authors = [
    { name = "MCP Document Converter", email = "example@example.com" }
]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
]
dependencies = [
    # MCP 核心
    "mcp>=1.0.0",
    "pydantic>=2.0.0",
    
    # 解析器依赖
    "markdown>=3.5.0",
    "beautifulsoup4>=4.12.0",
    "python-docx>=1.1.0",
    "PyPDF2>=3.0.0",
    "pdfplumber>=0.10.0",
    "chardet>=5.0.0",
    "pyyaml>=6.0.0",
    
    # 渲染器依赖（基础）
    "pygments>=2.17.0",
    "jinja2>=3.1.0",
    
    # PDF 备选方案（无需 GTK）
    "reportlab>=4.0.0",
]

[project.optional-dependencies]
# WeasyPrint 提供更高质量的 PDF 渲染，但需要 GTK 库（Windows 上安装较复杂）
weasyprint = [
    "weasyprint>=60.0",
]

dev = [
    "pytest>=7.0.0",
    "pytest-asyncio>=0.21.0",
    "black>=23.0.0",
    "mypy>=1.0.0",
    "ruff>=0.1.0",
]

[project.scripts]
mcp-document-converter = "mcp_document_converter.server:main_sync"

[tool.hatch.build.targets.wheel]
packages = ["src/mcp_document_converter"]

[tool.black]
line-length = 100
target-version = ['py310']

[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true

[tool.ruff]
line-length = 100
select = ["E", "F", "I", "N", "W"]
ignore = ["E501"]
