File: conf.py

package info (click to toggle)
python-confuse 2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 652 kB
  • sloc: python: 3,065; makefile: 112; sh: 8
file content (37 lines) | stat: -rw-r--r-- 921 bytes parent folder | download
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
import datetime as dt
import os
import re
import sys
from pathlib import Path

MATCH_VERSION_LINE = re.compile(r"version = \W((\d+\.\d+)\.\d.*?)\W").fullmatch

pyproject = Path(__file__).parent.parent / "pyproject.toml"
version_line_match = next(
    filter(None, map(MATCH_VERSION_LINE, pyproject.read_text().splitlines()))
)
release, version = version_line_match.groups()

sys.path.insert(0, os.path.abspath(".."))

extensions = [
    "sphinx.ext.autodoc",
    "sphinx.ext.intersphinx",
    "sphinx.ext.viewcode",
    "sphinx.ext.autosectionlabel",
    "sphinx_rtd_theme",
]
source_suffix = ".rst"
master_doc = "index"

project = "Confuse"
copyright = f"2012-{dt.date.today().year}, Adrian Sampson & contributors"

exclude_patterns = ["_build"]

pygments_style = "sphinx"

# -- Options for HTML output --------------------------------------------------

html_theme = "sphinx_rtd_theme"
htmlhelp_basename = "Confusedoc"