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

[project]
name = "gvsdsdk"
version = "1.0.0"
description = "GVS-DSDK — GVS Distributed SDK, shared communication bridge between gvsds master and sub-servers"
readme = "README.md"
requires-python = ">=3.8"
license = { text = "Proprietary" }
authors = [
    { name = "GVS Team" },
]
keywords = ["gvsds", "msync", "distributed", "sdk", "service-mesh"]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "License :: Other/Proprietary License",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Topic :: Software Development :: Libraries :: Python Modules",
]

# 核心依赖：仅标准库 + gvsds 原生层
dependencies = [
    # 纯标准库实现，运行时无第三方依赖
    # 仅开发时需要：pytest（可选）
]

[project.optional-dependencies]
dev = [
    "pytest>=7.0",
    "pytest-cov>=4.0",
]
client = [
    # 子服务器需要 socketio + websocket-client
    "python-socketio[client]>=5.0,<6.0",
    "websocket-client>=1.5",
    "requests>=2.28",
]
master = [
    # 主服务器需要 socketio 服务端
    "python-socketio[asyncio]>=5.0,<6.0",
    "gevent>=22.0",
    "gevent-websocket>=0.10",
    "eventlet>=0.33",
]

[project.urls]
Homepage = "https://www.gvsds.com"
Documentation = "https://www.gvsds.com/docs/sdk"
Repository = "https://github.com/gvsds/gvsdsdk"
Issues = "https://github.com/gvsds/gvsdsdk/issues"

[project.scripts]
gvsdsdk = "gvsdsdk.__main__:main"

[tool.setuptools]
# 显式列出模块文件，避免命名混乱
# 包含 SDK 模块（Windows 下文件名不区分大小写，但内容按原始名导入）
py-modules = [
    "gvsdsdk.auth",
    "gvsdsdk.registry",
    "gvsdsdk.ogm",
    "gvsdsdk.Transaction",
    "gvsdsdk.LocalTx",
    "gvsdsdk.client",
    "gvsdsdk.models",
]

[tool.setuptools.package-data]
gvsdsdk = ["README.md", "pyproject.toml"]