2022-04-16 15:38:39 -05:00
|
|
|
[build-system]
|
|
|
|
requires = ["flit_core>=3.7"]
|
|
|
|
build-backend = "flit_core.buildapi"
|
2018-01-27 10:52:16 -06:00
|
|
|
|
2022-04-16 15:38:39 -05:00
|
|
|
# project metadata
|
|
|
|
[project]
|
|
|
|
name = "Sphinx"
|
|
|
|
description = "Python documentation generator"
|
|
|
|
readme = "README.rst"
|
|
|
|
urls.Changelog = "https://www.sphinx-doc.org/en/master/changes.html"
|
|
|
|
urls.Code = "https://github.com/sphinx-doc/sphinx"
|
|
|
|
urls.Download = "https://pypi.org/project/Sphinx/"
|
|
|
|
urls.Homepage = "https://www.sphinx-doc.org/"
|
|
|
|
urls."Issue tracker" = "https://github.com/sphinx-doc/sphinx/issues"
|
2023-01-01 16:12:55 -06:00
|
|
|
license.text = "BSD-2-Clause"
|
2022-04-18 11:33:56 -05:00
|
|
|
requires-python = ">=3.8"
|
2008-03-25 06:01:28 -05:00
|
|
|
|
2022-04-16 15:38:39 -05:00
|
|
|
# Classifiers list: https://pypi.org/classifiers/
|
|
|
|
classifiers = [
|
|
|
|
"Development Status :: 5 - Production/Stable",
|
|
|
|
"Environment :: Console",
|
|
|
|
"Environment :: Web Environment",
|
|
|
|
"Intended Audience :: Developers",
|
|
|
|
"Intended Audience :: Education",
|
|
|
|
"Intended Audience :: End Users/Desktop",
|
|
|
|
"Intended Audience :: Science/Research",
|
|
|
|
"Intended Audience :: System Administrators",
|
|
|
|
"License :: OSI Approved :: BSD License",
|
|
|
|
"Operating System :: OS Independent",
|
|
|
|
"Programming Language :: Python",
|
|
|
|
"Programming Language :: Python :: 3",
|
|
|
|
"Programming Language :: Python :: 3 :: Only",
|
|
|
|
"Programming Language :: Python :: 3.8",
|
|
|
|
"Programming Language :: Python :: 3.9",
|
|
|
|
"Programming Language :: Python :: 3.10",
|
2022-09-27 08:21:55 -05:00
|
|
|
"Programming Language :: Python :: 3.11",
|
2022-04-16 15:38:39 -05:00
|
|
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
|
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
|
|
"Framework :: Setuptools Plugin",
|
|
|
|
"Framework :: Sphinx",
|
|
|
|
"Framework :: Sphinx :: Extension",
|
|
|
|
"Framework :: Sphinx :: Theme",
|
|
|
|
"Topic :: Documentation",
|
|
|
|
"Topic :: Documentation :: Sphinx",
|
|
|
|
"Topic :: Internet :: WWW/HTTP :: Site Management",
|
|
|
|
"Topic :: Printing",
|
|
|
|
"Topic :: Software Development",
|
|
|
|
"Topic :: Software Development :: Documentation",
|
|
|
|
"Topic :: Text Processing",
|
|
|
|
"Topic :: Text Processing :: General",
|
|
|
|
"Topic :: Text Processing :: Indexing",
|
|
|
|
"Topic :: Text Processing :: Markup",
|
|
|
|
"Topic :: Text Processing :: Markup :: HTML",
|
|
|
|
"Topic :: Text Processing :: Markup :: LaTeX",
|
|
|
|
"Topic :: Utilities",
|
|
|
|
]
|
|
|
|
dependencies = [
|
|
|
|
"sphinxcontrib-applehelp",
|
|
|
|
"sphinxcontrib-devhelp",
|
|
|
|
"sphinxcontrib-jsmath",
|
|
|
|
"sphinxcontrib-htmlhelp>=2.0.0",
|
|
|
|
"sphinxcontrib-serializinghtml>=1.1.5",
|
|
|
|
"sphinxcontrib-qthelp",
|
|
|
|
"Jinja2>=3.0",
|
2023-01-01 13:17:03 -06:00
|
|
|
"Pygments>=2.13",
|
2022-05-22 15:09:39 -05:00
|
|
|
"docutils>=0.18,<0.20",
|
2022-04-16 15:38:39 -05:00
|
|
|
"snowballstemmer>=2.0",
|
|
|
|
"babel>=2.9",
|
|
|
|
"alabaster>=0.7,<0.8",
|
|
|
|
"imagesize>=1.3",
|
2022-10-21 19:33:32 -05:00
|
|
|
"requests>=2.25.0",
|
2022-04-16 15:38:39 -05:00
|
|
|
"packaging>=21.0",
|
|
|
|
"importlib-metadata>=4.8; python_version < '3.10'",
|
|
|
|
"colorama>=0.4.5; sys_platform == 'win32'",
|
|
|
|
]
|
|
|
|
dynamic = ["version"]
|
2008-03-18 14:37:05 -05:00
|
|
|
|
2022-04-16 15:38:39 -05:00
|
|
|
[project.optional-dependencies]
|
|
|
|
docs = [
|
|
|
|
"sphinxcontrib-websupport",
|
|
|
|
]
|
|
|
|
lint = [
|
|
|
|
"flake8>=3.5.0",
|
2022-09-20 15:30:31 -05:00
|
|
|
"flake8-simplify",
|
2022-04-16 15:38:39 -05:00
|
|
|
"isort",
|
2023-01-05 05:40:52 -06:00
|
|
|
"ruff",
|
2022-11-13 14:36:24 -06:00
|
|
|
"mypy>=0.990",
|
2022-04-16 15:38:39 -05:00
|
|
|
"sphinx-lint",
|
|
|
|
"docutils-stubs",
|
|
|
|
"types-requests",
|
|
|
|
]
|
|
|
|
test = [
|
|
|
|
"pytest>=4.6",
|
|
|
|
"html5lib",
|
|
|
|
"cython",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[project.authors]]
|
|
|
|
name = "Georg Brandl"
|
|
|
|
email = "georg@python.org"
|
|
|
|
|
|
|
|
[project.scripts]
|
|
|
|
sphinx-build = "sphinx.cmd.build:main"
|
|
|
|
sphinx-quickstart = "sphinx.cmd.quickstart:main"
|
|
|
|
sphinx-apidoc = "sphinx.ext.apidoc:main"
|
|
|
|
sphinx-autogen = "sphinx.ext.autosummary.generate:main"
|
|
|
|
|
|
|
|
[project.entry-points."distutils.commands"]
|
|
|
|
build_sphinx = 'sphinx.setup_command:BuildDoc'
|
|
|
|
|
|
|
|
[tool.flit.module]
|
|
|
|
name = "sphinx"
|
|
|
|
|
|
|
|
[tool.flit.sdist]
|
|
|
|
include = [
|
|
|
|
"LICENSE",
|
|
|
|
"AUTHORS",
|
|
|
|
"CHANGES",
|
|
|
|
# Documentation
|
|
|
|
"doc/",
|
|
|
|
"CODE_OF_CONDUCT", # used as an include in the Documentation
|
|
|
|
"EXAMPLES", # used as an include in the Documentation
|
|
|
|
# Tests
|
|
|
|
"tests/",
|
|
|
|
"tox.ini",
|
|
|
|
# Utilities
|
|
|
|
"utils/",
|
|
|
|
"babel.cfg",
|
|
|
|
]
|
|
|
|
exclude = [
|
|
|
|
"doc/_build",
|
|
|
|
]
|
2022-09-21 12:46:30 -05:00
|
|
|
|
|
|
|
[tool.isort]
|
|
|
|
line_length = 95
|
2023-01-07 12:31:15 -06:00
|
|
|
profile = "black"
|
2022-12-29 17:47:25 -06:00
|
|
|
remove_redundant_aliases = true
|
2022-09-21 12:46:30 -05:00
|
|
|
|
2022-12-29 11:00:27 -06:00
|
|
|
[tool.ruff]
|
|
|
|
target-version = "py38" # Pin Ruff to Python 3.8
|
|
|
|
line-length = 95
|
|
|
|
exclude = [
|
|
|
|
'.git',
|
|
|
|
'.tox',
|
|
|
|
'.venv',
|
|
|
|
'tests/roots/*',
|
|
|
|
'build/*',
|
|
|
|
'doc/_build/*',
|
|
|
|
'sphinx/search/*',
|
|
|
|
'doc/usage/extensions/example*.py',
|
|
|
|
]
|
|
|
|
ignore = [
|
|
|
|
# pycodestyle
|
|
|
|
'E741',
|
|
|
|
# flake8-bugbear
|
|
|
|
'B006',
|
|
|
|
'B023',
|
|
|
|
# flake8-bugbear opinionated (disabled by default in flake8)
|
|
|
|
'B904',
|
|
|
|
'B905',
|
2022-12-29 17:39:39 -06:00
|
|
|
# pygrep-hooks
|
|
|
|
"PGH003",
|
2023-01-23 02:32:25 -06:00
|
|
|
# flake8-pie
|
|
|
|
"PIE790", # unnecessary 'pass' statement
|
2023-01-23 02:03:12 -06:00
|
|
|
# pylint
|
|
|
|
"PLR2004", # avoid magic values
|
2022-12-29 17:46:04 -06:00
|
|
|
# flake8-bandit
|
|
|
|
"S101", # assert used
|
|
|
|
"S105", # possible hardcoded password
|
2023-01-07 09:08:04 -06:00
|
|
|
"S113", # probable use of requests call without timeout
|
|
|
|
"S324", # probable use of insecure hash functions
|
2023-01-23 02:04:59 -06:00
|
|
|
"S701", # use autoescape=True for Jinja
|
2023-01-05 05:38:29 -06:00
|
|
|
# flake8-simplify
|
|
|
|
"SIM102", # nested 'if' statements
|
2023-01-07 16:28:45 -06:00
|
|
|
"SIM103", # return condition directly
|
2023-01-05 05:38:29 -06:00
|
|
|
"SIM105", # use contextlib.suppress
|
2023-01-07 09:08:04 -06:00
|
|
|
"SIM108", # use ternary operator
|
2023-01-23 02:04:04 -06:00
|
|
|
"SIM115", # use context handler for opening files
|
2023-01-05 05:38:29 -06:00
|
|
|
"SIM117", # use single 'with' statement
|
2023-01-22 11:50:29 -06:00
|
|
|
# pyupgrade
|
|
|
|
"UP031", # replace with format specifiers
|
2022-12-29 11:00:27 -06:00
|
|
|
]
|
|
|
|
external = [ # Whitelist for RUF100 unkown code warnings
|
|
|
|
"E704",
|
|
|
|
"W291",
|
|
|
|
"W293",
|
2023-01-01 22:52:46 -06:00
|
|
|
"SIM110",
|
2023-01-05 05:45:29 -06:00
|
|
|
"SIM113",
|
2022-12-29 11:00:27 -06:00
|
|
|
]
|
|
|
|
select = [
|
|
|
|
"E", # pycodestyle
|
|
|
|
"F", # Pyflakes
|
|
|
|
"W", # pycodestyle
|
|
|
|
# plugins:
|
|
|
|
"B", # flake8-bugbear
|
|
|
|
"C4", # flake8-comprehensions
|
2023-01-23 02:32:25 -06:00
|
|
|
"EXE", # flake8-executable
|
2023-01-23 02:10:22 -06:00
|
|
|
"I", # isort
|
2023-01-23 02:32:25 -06:00
|
|
|
"ICN", # flake8-import-conventions
|
|
|
|
"INP", # flake8-no-pep420
|
2022-12-29 17:39:39 -06:00
|
|
|
"PGH", # pygrep-hooks
|
2023-01-23 02:32:25 -06:00
|
|
|
"PIE", # flake8-pie
|
2023-01-23 02:03:12 -06:00
|
|
|
"PL", # pylint
|
2022-12-29 17:46:04 -06:00
|
|
|
"S", # flake8-bandit
|
2022-12-29 11:00:27 -06:00
|
|
|
"SIM", # flake8-simplify
|
2022-12-29 17:46:42 -06:00
|
|
|
"T10", # flake8-debugger
|
2023-01-31 12:13:53 -06:00
|
|
|
"TCH", # flake8-type-checking
|
2023-01-23 02:32:25 -06:00
|
|
|
"TID", # flake8-tidy-imports
|
2022-12-29 17:46:56 -06:00
|
|
|
"UP", # pyupgrade
|
2023-01-23 02:32:25 -06:00
|
|
|
"YTT", # flake8-2020
|
2022-12-29 17:39:39 -06:00
|
|
|
"RUF100", # yesqa
|
2022-12-29 11:00:27 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[tool.ruff.per-file-ignores]
|
2023-01-23 02:32:25 -06:00
|
|
|
"doc/conf.py" = ["INP001"]
|
|
|
|
"doc/development/tutorials/examples/*" = ["INP001"]
|
|
|
|
|
2022-12-29 11:00:27 -06:00
|
|
|
"tests/*" = ["E501"]
|
|
|
|
"sphinx/environment/collectors/toctree.py" = ["B026"]
|
|
|
|
"sphinx/environment/adapters/toctree.py" = ["B026"]
|
|
|
|
|
2022-09-21 12:46:30 -05:00
|
|
|
[tool.mypy]
|
|
|
|
check_untyped_defs = true
|
|
|
|
disallow_incomplete_defs = true
|
|
|
|
follow_imports = "skip"
|
|
|
|
ignore_missing_imports = true
|
|
|
|
no_implicit_optional = true
|
2022-04-18 11:33:56 -05:00
|
|
|
python_version = "3.8"
|
2022-09-21 12:46:30 -05:00
|
|
|
show_column_numbers = true
|
|
|
|
show_error_codes = true
|
|
|
|
show_error_context = true
|
|
|
|
strict_optional = true
|
|
|
|
warn_redundant_casts = true
|
|
|
|
warn_unused_ignores = true
|
2022-09-24 09:12:01 -05:00
|
|
|
disallow_any_generics = true
|
2022-09-21 12:46:30 -05:00
|
|
|
|
|
|
|
[[tool.mypy.overrides]]
|
|
|
|
module = [
|
|
|
|
"sphinx.application",
|
|
|
|
"sphinx.builders",
|
|
|
|
"sphinx.builders.html",
|
|
|
|
"sphinx.builders.latex",
|
|
|
|
"sphinx.builders.linkcheck",
|
2023-01-02 12:32:44 -06:00
|
|
|
"sphinx.domains",
|
|
|
|
"sphinx.domains.c",
|
|
|
|
"sphinx.domains.cpp",
|
|
|
|
"sphinx.domains.javascript",
|
|
|
|
"sphinx.domains.python",
|
|
|
|
"sphinx.domains.std",
|
2022-09-21 12:46:30 -05:00
|
|
|
"sphinx.environment",
|
|
|
|
"sphinx.environment.adapters.toctree",
|
|
|
|
"sphinx.environment.adapters.indexentries",
|
2022-12-29 13:09:17 -06:00
|
|
|
"sphinx.ext.apidoc",
|
|
|
|
"sphinx.ext.autodoc",
|
|
|
|
"sphinx.ext.autodoc.mock",
|
|
|
|
"sphinx.ext.autodoc.importer",
|
|
|
|
"sphinx.ext.autodoc.preserve_defaults",
|
|
|
|
"sphinx.ext.autodoc.type_comment",
|
|
|
|
"sphinx.ext.autosummary",
|
|
|
|
"sphinx.ext.autosummary.generate",
|
|
|
|
"sphinx.ext.doctest",
|
|
|
|
"sphinx.ext.duration",
|
|
|
|
"sphinx.ext.graphviz",
|
|
|
|
"sphinx.ext.inheritance_diagram",
|
|
|
|
"sphinx.ext.intersphinx",
|
|
|
|
"sphinx.ext.imgmath",
|
|
|
|
"sphinx.ext.linkcode",
|
|
|
|
"sphinx.ext.mathjax",
|
|
|
|
"sphinx.ext.napoleon",
|
|
|
|
"sphinx.ext.napoleon.docstring",
|
2022-09-21 12:46:30 -05:00
|
|
|
"sphinx.pycode.parser",
|
|
|
|
"sphinx.registry",
|
|
|
|
"sphinx.setup_command",
|
|
|
|
"sphinx.testing.util",
|
|
|
|
"sphinx.transforms.i18n",
|
|
|
|
"sphinx.transforms.post_transforms.images",
|
|
|
|
"sphinx.util.cfamily",
|
|
|
|
"sphinx.util.docfields",
|
|
|
|
"sphinx.util.docutils",
|
|
|
|
"sphinx.util.typing",
|
|
|
|
"sphinx.writers.latex",
|
|
|
|
"sphinx.writers.text",
|
2023-01-02 11:55:53 -06:00
|
|
|
"sphinx.writers.xml",
|
2022-09-21 12:46:30 -05:00
|
|
|
]
|
|
|
|
strict_optional = false
|
|
|
|
|
2022-09-24 09:12:01 -05:00
|
|
|
[[tool.mypy.overrides]]
|
|
|
|
module = [
|
|
|
|
"sphinx.application",
|
2022-09-29 11:26:53 -05:00
|
|
|
"sphinx.builders._epub_base",
|
|
|
|
"sphinx.builders.html",
|
|
|
|
"sphinx.builders.linkcheck",
|
2022-09-27 11:56:35 -05:00
|
|
|
"sphinx.cmd.quickstart",
|
2022-09-24 09:12:01 -05:00
|
|
|
"sphinx.config",
|
2023-01-02 12:32:44 -06:00
|
|
|
"sphinx.domains",
|
|
|
|
"sphinx.domains.c",
|
|
|
|
"sphinx.domains.cpp",
|
2022-09-24 09:12:01 -05:00
|
|
|
"sphinx.environment.*",
|
|
|
|
"sphinx.events",
|
|
|
|
"sphinx.ext.*",
|
|
|
|
"sphinx.highlighting",
|
|
|
|
"sphinx.jinja2glue",
|
|
|
|
"sphinx.registry",
|
|
|
|
"sphinx.roles",
|
|
|
|
"sphinx.search.*",
|
|
|
|
"sphinx.testing.*",
|
|
|
|
"sphinx.util.*",
|
|
|
|
]
|
|
|
|
disallow_any_generics = false
|
|
|
|
|
2022-09-21 12:46:30 -05:00
|
|
|
[tool.pytest.ini_options]
|
|
|
|
filterwarnings = [
|
|
|
|
"all",
|
|
|
|
"ignore::DeprecationWarning:docutils.io",
|
|
|
|
"ignore::DeprecationWarning:pyximport.pyximport",
|
|
|
|
"ignore::ImportWarning:importlib._bootstrap",
|
|
|
|
]
|
|
|
|
markers = [
|
|
|
|
"apidoc",
|
|
|
|
"setup_command",
|
|
|
|
]
|
|
|
|
testpaths = ["tests"]
|
2022-12-29 08:09:56 -06:00
|
|
|
|
|
|
|
[tool.coverage.run]
|
|
|
|
branch = true
|
|
|
|
parallel = true
|
|
|
|
source = ['sphinx']
|
|
|
|
|
|
|
|
[tool.coverage.report]
|
|
|
|
exclude_lines = [
|
|
|
|
# Have to re-enable the standard pragma
|
|
|
|
'pragma: no cover',
|
|
|
|
# Don't complain if tests don't hit defensive assertion code:
|
|
|
|
'raise NotImplementedError',
|
|
|
|
# Don't complain if non-runnable code isn't run:
|
|
|
|
'if __name__ == .__main__.:',
|
|
|
|
]
|
|
|
|
ignore_errors = true
|