|
2 | 2 | # |
3 | 3 | # SPDX-License-Identifier: MIT |
4 | 4 |
|
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 | | - |
17 | 5 | import datetime |
18 | 6 | import os |
19 | 7 | import time |
20 | 8 | import sys |
| 9 | + |
21 | 10 | sys.path.insert(0, os.path.abspath('..')) |
22 | 11 | import mesonpy |
23 | 12 |
|
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) |
31 | 15 |
|
32 | 16 | 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 | +copyright = f'2021\N{EN DASH}{_build_date.year} The meson-python developers' |
| 18 | +version = release = mesonpy.__version__ |
39 | 19 |
|
| 20 | +html_theme = 'furo' |
| 21 | +html_title = f'meson-python {version}' |
40 | 22 |
|
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. |
46 | 23 | extensions = [ |
47 | | - 'sphinx.ext.todo', |
48 | 24 | 'sphinx_copybutton', |
49 | 25 | 'sphinx_design', |
50 | 26 | 'sphinxext.opengraph', |
51 | 27 | 'sphinx.ext.intersphinx', |
52 | 28 | ] |
53 | 29 |
|
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 |
75 | 31 | intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} |
76 | 32 |
|
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 |
102 | 34 | ogp_site_url = 'https://mesonbuild.com/meson-python/' |
103 | 35 | 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'] |
0 commit comments