Skip to content

Commit 696b87b

Browse files
committed
DOC: cleanup Sphinx configuration
1 parent d92ae35 commit 696b87b

File tree

2 files changed

+9
-108
lines changed

2 files changed

+9
-108
lines changed

docs/conf.py

Lines changed: 9 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -2,108 +2,34 @@
22
#
33
# SPDX-License-Identifier: MIT
44

5-
# Configuration file for the Sphinx documentation builder.
6-
#
7-
# This file only contains a selection of the most common options. For a full
8-
# list see the documentation:
9-
# https://www.sphinx-doc.org/en/master/usage/configuration.html
10-
11-
# -- Path setup --------------------------------------------------------------
12-
13-
# If extensions (or modules to document with autodoc) are in another directory,
14-
# add these directories to sys.path here. If the directory is relative to the
15-
# documentation root, use os.path.abspath to make it absolute, like shown here.
16-
175
import datetime
186
import os
197
import time
208
import sys
9+
2110
sys.path.insert(0, os.path.abspath('..'))
2211
import mesonpy
2312

24-
build_date = datetime.datetime.fromtimestamp(
25-
int(os.environ.get('SOURCE_DATE_EPOCH', time.time())),
26-
tz=datetime.timezone.utc,
27-
)
28-
29-
30-
# -- Project information -----------------------------------------------------
13+
_build_time = int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))
14+
_build_date = datetime.datetime.fromtimestamp(_build_time, tz=datetime.timezone.utc)
3115

3216
project = 'meson-python'
33-
copyright = f'2021\N{EN DASH}{build_date.year} The meson-python developers'
34-
35-
# The short X.Y version
36-
version = mesonpy.__version__
37-
# The full version, including alpha/beta/rc tags
38-
release = mesonpy.__version__
17+
version = release = mesonpy.__version__
18+
copyright = f'2021\N{EN DASH}{_build_date.year} The meson-python developers'
3919

20+
html_theme = 'furo'
21+
html_title = f'meson-python {version}'
4022

41-
# -- General configuration ---------------------------------------------------
42-
43-
# Add any Sphinx extension module names here, as strings. They can be
44-
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
45-
# ones.
4623
extensions = [
47-
'sphinx.ext.todo',
4824
'sphinx_copybutton',
4925
'sphinx_design',
5026
'sphinxext.opengraph',
5127
'sphinx.ext.intersphinx',
5228
]
5329

54-
55-
try:
56-
import sphinxcontrib.spelling
57-
extensions.append('sphinxcontrib.spelling')
58-
spelling_show_suggestions = True
59-
spelling_warning = True
60-
except ImportError:
61-
pass
62-
63-
# Add any paths that contain templates here, relative to this directory.
64-
templates_path = ['_templates']
65-
66-
# List of patterns, relative to source directory, that match files and
67-
# directories to ignore when looking for source files.
68-
# This pattern also affects html_static_path and html_extra_path.
69-
exclude_patterns = []
70-
71-
default_role = 'any'
72-
73-
todo_include_todos = True
74-
30+
# sphinx.ext.intersphinx
7531
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
7632

77-
# -- Options for HTML output -------------------------------------------------
78-
79-
# The theme to use for HTML and HTML Help pages. See the documentation for
80-
# a list of builtin themes.
81-
#
82-
html_theme = 'furo'
83-
html_title = f'meson-python {version}'
84-
85-
html_static_path = ['static']
86-
html_css_files = [
87-
'css/contributors.css',
88-
]
89-
90-
html_theme_options = {
91-
'light_css_variables': {
92-
'font-stack': (
93-
'system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,'
94-
'Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji'
95-
),
96-
},
97-
}
98-
99-
100-
# Open Graph
101-
33+
# sphinxext.opengraph
10234
ogp_site_url = 'https://mesonbuild.com/meson-python/'
10335
ogp_site_name = 'meson-python documentation'
104-
105-
106-
# Add any paths that contain custom static files (such as style sheets) here,
107-
# relative to this directory. They are copied after the builtin static files,
108-
# so a file named 'default.css' will overwrite the builtin 'default.css'.
109-
# html_static_path = ['_static']

docs/static/css/contributors.css

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)