-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
135 lines (122 loc) · 3.31 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"
[tool.maturin]
features = ["pyo3/extension-module"]
python-source = "python"
manifest-path = "crates/py_binding/Cargo.toml"
[project]
name = "sphinx_rust"
dynamic = ["version"]
description = "Sphinx plugin for documentation of Rust projects."
authors = [{ name = "Chris Sewell", email = "[email protected]" }]
readme = "README.md"
requires-python = ">=3.9"
license = { file = "LICENSE" }
keywords = [
"sphinx",
"rust",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Rust",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Text Processing :: Markup",
]
dependencies = [
"sphinx~=7.3"
]
[project.urls]
Repository = "https://github.com/sphinx-extensions2/sphinx-rust"
Documentation = "http://sphinx-rust.readthedocs.io"
[project.optional-dependencies]
dev = [
"ipython"
]
test = [
"pytest",
"defusedxml",
]
docs = [
"furo",
"myst-parser",
"sphinx_needs",
"sphinxcontrib-plantuml"
]
[tool.ruff.lint]
preview = true
extend-select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"FURB",# refurb (modernising code)
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PERF",# perflint (performance anti-patterns)
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PTH", # flake8-use-pathlib
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
"UP", # pyupgrade
"T20", # flake8-print
]
extend-ignore = [
"ISC001", # implicit-str-concat
"RUF012", # typing.ClassVar
]
[tool.ruff.lint.isort]
force-sort-within-sections = true
[tool.mypy]
strict = true
[tool.coverage.report]
exclude_lines = [
"if TYPE_CHECKING:",
]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = dev
[testenv]
usedevelop = true
[testenv:dev]
extras = dev
passenv = TERM
; ensure that the compilation is up-to-date
; There is an issue with mixing maturin with tox-conda, raising:
; Both VIRTUAL_ENV and CONDA_PREFIX are set. Please unset one of them
allowlist_externals = bash
commands_pre = bash -c "unset CONDA_PREFIX; maturin develop"
commands = {posargs:ipython}
[testenv:test-{py39,py310,py311,py312}]
extras = test
passenv = TERM
; ensure that the compilation is up-to-date
; There is an issue with mixing maturin with tox-conda, raising:
; Both VIRTUAL_ENV and CONDA_PREFIX are set. Please unset one of them
allowlist_externals = bash
commands_pre = bash -c "unset CONDA_PREFIX; maturin develop"
commands = pytest {posargs}
[testenv:docs]
extras = docs
passenv = TERM
allowlist_externals =
bash
echo
commands_pre = bash -c "unset CONDA_PREFIX; maturin develop"
commands = sphinx-build -nW --keep-going {posargs} -b html docs/ docs/_build/html
commands_post = echo "open file://{toxinidir}/docs/_build/html/index.html"
"""