[package]
name = "pyproject-fmt"
version = "2.28.2"
description = "Format pyproject.toml files"
repository = "https://github.com/tox-dev/pyproject-fmt"
license = "MIT"
edition = "2021"
readme = "README.md"

[lib]
name = "_pyproject_fmt"
path = "rust/src/main.rs"
crate-type = ["cdylib"]

[dependencies]
common = {path = "../common" }
# Sibling crate, pulled in as a library so the [tool.tox] handler shares one source of
# truth with the standalone tox.toml formatter. Default features disabled so the linked
# copy here doesn't pull in pyo3's `extension-module` and double-link Python symbols.
tox-toml-fmt = { path = "../tox-toml-fmt", default-features = false }
regex = { version = "1.13.1" }
pyo3 = { version = "0.29.2", features = ["generate-import-lib"] } # integration with Python
lexical-sort = { version = "0.3.1" }
tombi-parser = { workspace = true }
tombi-syntax = { workspace = true }
tombi-formatter = { workspace = true }
tombi-config = { workspace = true }
tombi-schema-store = { workspace = true }
tokio = { version = "1", features = ["rt"] }

[features]
extension-module = ["pyo3/extension-module"]
# `abi3` can be disabled to produce per-version wheels (needed for free-threaded 3.15t until
# CPython lands PEP 803 abi3t loader: https://github.com/python/cpython/issues/146636).
abi3 = ["pyo3/abi3-py310"]
default = ["extension-module", "abi3"]

[dev-dependencies]
common = { path = "../common", features = ["test-util"] }
indoc = { version = "2.0.7" }   # dedented test cases for literal strings
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
insta = { version = "1.48.0", features = ["redactions"] } # snapshot testing
pyo3 = { version = "0.29.2", features = ["auto-initialize"] }
toml = "1.1.4"
