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

[project]
name = "hs-fbb-cli"
version = "1.1.0"
description = "Build environment + CLI for HiSpark fbb framework SDKs (fbb_ws63, fbb_bs2x, ...)"
readme = "README.md"
requires-python = ">=3.11"
license = { file = "LICENSE" }
authors = [
    { name = "HiSilicon (Shanghai) Technologies Co., Ltd." },
]
keywords = ["hispark", "fbb", "fbb_ws63", "fbb_bs2x", "embedded", "riscv", "sdk"]
classifiers = [
    "Development Status :: 4 - Beta",
    "Environment :: Console",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: Apache Software License",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Topic :: Software Development :: Build Tools",
    "Topic :: Software Development :: Embedded Systems",
]
# pyserial backs `fbb monitor` (serial console) — the stdlib has no serial
# support. Everything else in the CLI stays stdlib-only; the build venv
# installs numpy/kconfiglib/etc. at runtime.
dependencies = [
    "pyserial>=3.5,<4",
]

[project.optional-dependencies]
# Only needed by maintainers running scripts/i18n.sh (extract / update / compile
# message catalogs). Runtime gettext is stdlib; .mo files are pre-compiled and
# shipped in the wheel, so end-users never need Babel.
dev = [
    "babel>=2.12",
]
# Contract tests (exit codes, --json-summary schemas, SDK detection).
# Stdlib-only CLI + pyserial is already a runtime dep, so pytest is all we add.
test = [
    "pytest>=7",
    "pytest-xdist>=3,<4",
]

[project.scripts]
fbb = "hs_fbb_cli.cli:main"

[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra"

[project.urls]
Repository = "https://gitcode.com/HiSpark/hs-fbb-cli"

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

[tool.hatch.build.targets.wheel.force-include]
"requirements.txt" = "hs_fbb_cli/data/requirements.txt"
"src/hs_fbb_cli/data/tools.json" = "hs_fbb_cli/data/tools.json"