| 1 |
[build-system] |
| 2 |
requires = ["flit_core>=3.12"] |
| 3 |
build-backend = "flit_core.buildapi" |
| 4 |
|
| 5 |
# project metadata |
| 6 |
[project] |
| 7 |
name = "Sphinx" |
| 8 |
description = "Python documentation generator" |
| 9 |
readme = "README.rst" |
| 10 |
urls.Changelog = "https://www.sphinx-doc.org/en/master/changes.html" |
| 11 |
urls.Code = "https://github.com/sphinx-doc/sphinx" |
| 12 |
urls.Documentation = "https://www.sphinx-doc.org/" |
| 13 |
urls.Download = "https://pypi.org/project/Sphinx/" |
| 14 |
urls.Homepage = "https://www.sphinx-doc.org/" |
| 15 |
urls."Issue tracker" = "https://github.com/sphinx-doc/sphinx/issues" |
| 16 |
license = "BSD-2-Clause" |
| 17 |
license-files = [ |
| 18 |
"LICENSE.rst", |
| 19 |
] |
| 20 |
requires-python = ">=3.12" |
| 21 |
|
| 22 |
# Classifiers list: https://pypi.org/classifiers/ |
| 23 |
classifiers = [ |
| 24 |
"Development Status :: 5 - Production/Stable", |
| 25 |
"Environment :: Console", |
| 26 |
"Environment :: Web Environment", |
| 27 |
"Intended Audience :: Developers", |
| 28 |
"Intended Audience :: Education", |
| 29 |
"Intended Audience :: End Users/Desktop", |
| 30 |
"Intended Audience :: Information Technology", |
| 31 |
"Intended Audience :: Other Audience", |
| 32 |
"Intended Audience :: Science/Research", |
| 33 |
"Intended Audience :: System Administrators", |
| 34 |
"Operating System :: OS Independent", |
| 35 |
"Programming Language :: Python", |
| 36 |
"Programming Language :: Python :: 3", |
| 37 |
"Programming Language :: Python :: 3 :: Only", |
| 38 |
"Programming Language :: Python :: 3.12", |
| 39 |
"Programming Language :: Python :: 3.13", |
| 40 |
"Programming Language :: Python :: 3.14", |
| 41 |
"Programming Language :: Python :: 3.15", |
| 42 |
"Programming Language :: Python :: Implementation :: CPython", |
| 43 |
"Programming Language :: Python :: Implementation :: PyPy", |
| 44 |
"Framework :: Sphinx", |
| 45 |
"Framework :: Sphinx :: Domain", |
| 46 |
"Framework :: Sphinx :: Extension", |
| 47 |
"Framework :: Sphinx :: Theme", |
| 48 |
"Topic :: Documentation", |
| 49 |
"Topic :: Documentation :: Sphinx", |
| 50 |
"Topic :: Education", |
| 51 |
"Topic :: Internet :: WWW/HTTP :: Site Management", |
| 52 |
"Topic :: Internet :: WWW/HTTP :: Site Management :: Link Checking", |
| 53 |
"Topic :: Printing", |
| 54 |
"Topic :: Software Development", |
| 55 |
"Topic :: Software Development :: Documentation", |
| 56 |
"Topic :: Text Editors :: Documentation", |
| 57 |
"Topic :: Text Processing", |
| 58 |
"Topic :: Text Processing :: General", |
| 59 |
"Topic :: Text Processing :: Indexing", |
| 60 |
"Topic :: Text Processing :: Markup", |
| 61 |
"Topic :: Text Processing :: Markup :: HTML", |
| 62 |
"Topic :: Text Processing :: Markup :: LaTeX", |
| 63 |
"Topic :: Text Processing :: Markup :: Markdown", |
| 64 |
"Topic :: Text Processing :: Markup :: reStructuredText", |
| 65 |
"Topic :: Text Processing :: Markup :: XML", |
| 66 |
"Topic :: Utilities", |
| 67 |
"Typing :: Typed", |
| 68 |
] |
| 69 |
dependencies = [ |
| 70 |
"Jinja2>=3.1", |
| 71 |
"Pygments>=2.17", |
| 72 |
"docutils>=0.21,<0.23", |
| 73 |
"snowballstemmer>=2.2", |
| 74 |
"babel>=2.13", |
| 75 |
"alabaster>=0.7.14", |
| 76 |
"imagesize>=1.3", |
| 77 |
"requests>=2.30.0", |
| 78 |
"roman-numerals>=1.0.0", |
| 79 |
"packaging>=23.0", |
| 80 |
"colorama>=0.4.6; sys_platform == 'win32'", |
| 81 |
] |
| 82 |
dynamic = ["version"] |
| 83 |
|
| 84 |
[[project.authors]] |
| 85 |
name = "Adam Turner" |
| 86 |
email = "[email protected]" |
| 87 |
|
| 88 |
[[project.authors]] |
| 89 |
name = "Georg Brandl" |
| 90 |
email = "[email protected]" |
| 91 |
|
| 92 |
[project.scripts] |
| 93 |
sphinx-build = "sphinx.cmd.build:main" |
| 94 |
sphinx-quickstart = "sphinx.cmd.quickstart:main" |
| 95 |
sphinx-apidoc = "sphinx.ext.apidoc:main" |
| 96 |
sphinx-autogen = "sphinx.ext.autosummary.generate:main" |
| 97 |
|
| 98 |
[dependency-groups] |
| 99 |
docs = [ |
| 100 |
"sphinxcontrib-websupport", |
| 101 |
] |
| 102 |
lint = [ |
| 103 |
"ruff==0.14.9", |
| 104 |
"sphinx-lint>=0.9", |
| 105 |
] |
| 106 |
package = [ |
| 107 |
"build", |
| 108 |
"pypi-attestations==0.0.28", |
| 109 |
"twine>=6.1", |
| 110 |
] |
| 111 |
sphinxcontrib = [ |
| 112 |
"sphinxcontrib-applehelp>=1.0.7", |
| 113 |
"sphinxcontrib-devhelp>=1.0.6", |
| 114 |
"sphinxcontrib-htmlhelp>=2.0.6", |
| 115 |
"sphinxcontrib-jsmath>=1.0.1", |
| 116 |
"sphinxcontrib-qthelp>=1.0.6", |
| 117 |
"sphinxcontrib-serializinghtml>=1.1.9", |
| 118 |
] |
| 119 |
test = [ |
| 120 |
"pytest>=9.0", |
| 121 |
"pytest-xdist[psutil]>=3.4", |
| 122 |
"cython>=3.0", # for Cython compilation |
| 123 |
"defusedxml>=0.7.1", # for secure XML/HTML parsing |
| 124 |
"setuptools>=70.0", # for Cython compilation |
| 125 |
"typing_extensions>=4.9", # for typing_extensions.Unpack |
| 126 |
] |
| 127 |
translations = [ |
| 128 |
"babel>=2.13", |
| 129 |
"Jinja2>=3.1", |
| 130 |
] |
| 131 |
types = [ |
| 132 |
"mypy==1.19.1", |
| 133 |
"pyrefly", |
| 134 |
"pyright==1.1.407", |
| 135 |
"ty", |
| 136 |
{ include-group = "type-stubs" }, |
| 137 |
] |
| 138 |
type-stubs = [ |
| 139 |
# align with versions used elsewhere |
| 140 |
"types-colorama==0.4.15.20250801", |
| 141 |
"types-defusedxml==0.7.0.20250822", |
| 142 |
"types-docutils==0.22.3.20251115", |
| 143 |
"types-Pillow==10.2.0.20240822", |
| 144 |
"types-Pygments==2.19.0.20251121", |
| 145 |
"types-requests==2.32.4.20250913", |
| 146 |
"types-urllib3==1.26.25.14", |
| 147 |
] |
| 148 |
|
| 149 |
[tool.flit.module] |
| 150 |
name = "sphinx" |
| 151 |
|
| 152 |
[tool.flit.sdist] |
| 153 |
include = [ |
| 154 |
"LICENSE.rst", |
| 155 |
"AUTHORS.rst", |
| 156 |
"CHANGES.rst", |
| 157 |
# Documentation |
| 158 |
"doc/", |
| 159 |
"CODE_OF_CONDUCT.rst", # used as an include in the Documentation |
| 160 |
"EXAMPLES.rst", # used as an include in the Documentation |
| 161 |
# Tests |
| 162 |
"tests/", |
| 163 |
"tox.ini", |
| 164 |
# Utilities |
| 165 |
"utils/", |
| 166 |
"babel.cfg", |
| 167 |
] |
| 168 |
exclude = [ |
| 169 |
"doc/_build", |
| 170 |
] |
| 171 |
|
| 172 |
[tool.mypy] |
| 173 |
files = [ |
| 174 |
"doc/conf.py", |
| 175 |
"doc/development/tutorials/examples/autodoc_intenum.py", |
| 176 |
"doc/development/tutorials/examples/helloworld.py", |
| 177 |
"sphinx", |
| 178 |
"tests", |
| 179 |
"utils", |
| 180 |
] |
| 181 |
exclude = [ |
| 182 |
"tests/roots", |
| 183 |
] |
| 184 |
python_version = "3.12" |
| 185 |
strict = true |
| 186 |
show_column_numbers = true |
| 187 |
show_error_context = true |
| 188 |
strict_equality = false |
| 189 |
warn_return_any = false |
| 190 |
enable_error_code = [ |
| 191 |
"type-arg", |
| 192 |
"redundant-self", |
| 193 |
"truthy-iterable", |
| 194 |
"ignore-without-code", |
| 195 |
"unused-awaitable", |
| 196 |
] |
| 197 |
|
| 198 |
[[tool.mypy.overrides]] |
| 199 |
module = [ |
| 200 |
"sphinx.domains.c", |
| 201 |
"sphinx.domains.c._ast", |
| 202 |
"sphinx.domains.c._parser", |
| 203 |
"sphinx.domains.c._symbol", |
| 204 |
"sphinx.domains.cpp", |
| 205 |
"sphinx.domains.cpp._ast", |
| 206 |
"sphinx.domains.cpp._parser", |
| 207 |
"sphinx.domains.cpp._symbol", |
| 208 |
] |
| 209 |
strict_optional = false |
| 210 |
|
| 211 |
[[tool.mypy.overrides]] |
| 212 |
module = [ |
| 213 |
"imagesize", |
| 214 |
"pyximport", |
| 215 |
"snowballstemmer", |
| 216 |
] |
| 217 |
ignore_missing_imports = true |
| 218 |
|
| 219 |
[[tool.mypy.overrides]] |
| 220 |
module = [ |
| 221 |
# tests/ |
| 222 |
"tests.test_search", |
| 223 |
# tests/test_config |
| 224 |
"tests.test_config.test_config", |
| 225 |
# tests/test_directives |
| 226 |
"tests.test_directives.test_directive_other", |
| 227 |
# tests/test_domains |
| 228 |
"tests.test_domains.test_domain_c", |
| 229 |
"tests.test_domains.test_domain_cpp", |
| 230 |
"tests.test_domains.test_domain_js", |
| 231 |
"tests.test_domains.test_domain_py", |
| 232 |
"tests.test_domains.test_domain_py_fields", |
| 233 |
"tests.test_domains.test_domain_py_pyfunction", |
| 234 |
"tests.test_domains.test_domain_py_pyobject", |
| 235 |
"tests.test_domains.test_domain_std", |
| 236 |
# tests/test_environment |
| 237 |
"tests.test_environment.test_environment_toctree", |
| 238 |
# tests/test_ext_autodoc |
| 239 |
"tests.test_ext_autodoc.test_ext_autodoc", |
| 240 |
"tests.test_ext_autodoc.test_ext_autodoc_mock", |
| 241 |
# tests/test_ext_autosummary |
| 242 |
"tests.test_ext_autosummary.test_ext_autosummary", |
| 243 |
# tests/test_ext_intersphinx |
| 244 |
"tests.test_ext_intersphinx.test_ext_intersphinx", |
| 245 |
# tests/test_ext_napoleon |
| 246 |
"tests.test_ext_napoleon.test_ext_napoleon_docstring", |
| 247 |
# tests/test_extensions |
| 248 |
"tests.test_extensions.test_ext_apidoc", |
| 249 |
"tests.test_extensions.test_ext_inheritance_diagram", |
| 250 |
# tests/test_util |
| 251 |
"tests.test_util.test_util_inspect", |
| 252 |
"tests.test_util.test_util_nodes", |
| 253 |
"tests.test_util.test_util_typing", |
| 254 |
] |
| 255 |
check_untyped_defs = false |
| 256 |
disable_error_code = [ |
| 257 |
"annotation-unchecked", |
| 258 |
] |
| 259 |
disallow_untyped_calls = false |
| 260 |
disallow_untyped_defs = false |
| 261 |
|
| 262 |
[[tool.mypy.overrides]] |
| 263 |
module = ["tests.test_util.typing_test_data"] |
| 264 |
ignore_errors = true |
| 265 |
|
| 266 |
[tool.coverage.run] |
| 267 |
branch = true |
| 268 |
parallel = true |
| 269 |
source = ['sphinx'] |
| 270 |
|
| 271 |
[tool.coverage.report] |
| 272 |
exclude_lines = [ |
| 273 |
# Have to re-enable the standard pragma |
| 274 |
'pragma: no cover', |
| 275 |
# Don't complain if tests don't hit defensive assertion code: |
| 276 |
'raise NotImplementedError', |
| 277 |
# Don't complain if non-runnable code isn't run: |
| 278 |
'if __name__ == .__main__.:', |
| 279 |
] |
| 280 |
ignore_errors = true |
| 281 |
|
| 282 |
[tool.pyright] |
| 283 |
typeCheckingMode = "strict" |
| 284 |
include = [ |
| 285 |
"doc/conf.py", |
| 286 |
"doc/development/tutorials/examples/autodoc_intenum.py", |
| 287 |
"doc/development/tutorials/examples/helloworld.py", |
| 288 |
"sphinx", |
| 289 |
"tests", |
| 290 |
"utils", |
| 291 |
] |
| 292 |
exclude = [ |
| 293 |
"tests/roots", |
| 294 |
] |
| 295 |
|
| 296 |
reportArgumentType = "none" |
| 297 |
reportAssignmentType = "none" |
| 298 |
reportAttributeAccessIssue = "none" |
| 299 |
reportCallIssue = "none" |
| 300 |
reportConstantRedefinition = "none" |
| 301 |
reportGeneralTypeIssues = "none" |
| 302 |
reportIncompatibleMethodOverride = "none" |
| 303 |
reportIncompatibleVariableOverride = "none" |
| 304 |
reportIndexIssue = "none" |
| 305 |
reportInvalidTypeForm = "none" |
| 306 |
reportMissingImports = "none" |
| 307 |
reportMissingModuleSource = "none" |
| 308 |
reportMissingParameterType = "none" |
| 309 |
reportMissingTypeArgument = "none" |
| 310 |
reportMissingTypeStubs = "none" |
| 311 |
reportOperatorIssue = "none" |
| 312 |
reportOptionalMemberAccess = "none" |
| 313 |
reportOptionalSubscript = "none" |
| 314 |
reportPossiblyUnboundVariable = "none" |
| 315 |
reportPrivateUsage = "none" |
| 316 |
reportRedeclaration = "none" |
| 317 |
reportReturnType = "none" |
| 318 |
reportUnknownArgumentType = "none" |
| 319 |
reportUnknownLambdaType = "none" |
| 320 |
reportUnknownMemberType = "none" |
| 321 |
reportUnknownParameterType = "none" |
| 322 |
reportUnknownVariableType = "none" |
| 323 |
reportUnnecessaryComparison = "none" |
| 324 |
reportUnnecessaryIsInstance = "none" |
| 325 |
reportUntypedBaseClass = "none" |
| 326 |
reportUntypedNamedTuple = "none" |
| 327 |
reportUnusedClass = "none" |
| 328 |
reportUnusedFunction = "none" |
| 329 |
reportUnusedImport = "none" |
| 330 |
reportUnusedVariable = "none" |
| 331 |
|
| 332 |
[tool.uv] |
| 333 |
default-groups = "all" |