[build-system]
requires = ["maturin~=1.0"]
build-backend = "maturin"

[project]
# NOTE: Most of the metadata are in Cargo.toml and injected by maturin
name = "nanopub-sign"
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3 :: Only",
    "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",
    "Programming Language :: Rust",
    "Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.8, <3.13"
dynamic = ["version"]

[project.urls]
Changelog = "https://github.com/vemonet/nanopub-rs/blob/main/CHANGELOG.md"
Documentation = "https://vemonet.github.io/nanopub-rs"
Homepage = "https://vemonet.github.io/nanopub-rs"
Source = "https://github.com/vemonet/nanopub-rs/tree/main/python"
Tracker = "https://github.com/vemonet/nanopub-rs/issues"

[tool.maturin]
features = ["pyo3/generate-import-lib"] # needed for Windows aarch64

[dependency-groups]
dev = [
    "maturin",
    # Linux specific dependency:
    # "maturin[patchelf]",
    "pytest >=8.3.4",
    "mktestdocs",
    "pre-commit",
]

[tool.uv]
# Rebuild package when any rust files change
cache-keys = [{file = "pyproject.toml"}, {file = "Cargo.toml"}, {file = "**/*.rs"}]
# Uncomment to build rust code in development mode
# config-settings = { build-args = '--profile=dev' }

[tool.ruff]
line-length = 120
select = [
    "ARG",
    "B",
    "C40",
    "E",
    "F",
    "FBT",
    "I",
    "ICN",
    "ISC",
    "N",
    "PIE",
    "PTH",
    "RET",
    "RUF",
    "SIM",
    "T10",
    "TID",
    "UP",
    "W",
    "YTT"
]
