Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
annotate docs/conf.py @ 61:392745b66969
The "\IS" keyword expansion
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 27 Apr 2026 19:25:45 +0200 |
| parents | 0ff291eac663 |
| children | 414bf3cbb152 |
| rev | line source |
|---|---|
|
45
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
1 # Configuration file for the Sphinx documentation builder. |
|
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
2 # |
|
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
3 # For the full list of built-in configuration values, see the documentation: |
|
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
4 # https://www.sphinx-doc.org/en/master/usage/configuration.html |
|
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
5 |
|
49
5c0f26a21e81
Determine "release" dynamically from the package's "__version__"
Franz Glasner <fzglas.hg@dom66.de>
parents:
48
diff
changeset
|
6 import ast |
|
5c0f26a21e81
Determine "release" dynamically from the package's "__version__"
Franz Glasner <fzglas.hg@dom66.de>
parents:
48
diff
changeset
|
7 import io |
|
5c0f26a21e81
Determine "release" dynamically from the package's "__version__"
Franz Glasner <fzglas.hg@dom66.de>
parents:
48
diff
changeset
|
8 import re |
|
5c0f26a21e81
Determine "release" dynamically from the package's "__version__"
Franz Glasner <fzglas.hg@dom66.de>
parents:
48
diff
changeset
|
9 |
|
45
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
10 # -- Project information ----------------------------------------------------- |
|
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
11 # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
|
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
12 |
|
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
13 project = 'Pygments Pseudocode Lexer' |
|
50
e6354e3abbec
Remove the comma in the copyright statement
Franz Glasner <fzglas.hg@dom66.de>
parents:
49
diff
changeset
|
14 copyright = '2026 Franz Glasner' |
|
45
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
15 author = 'Franz Glasner' |
|
49
5c0f26a21e81
Determine "release" dynamically from the package's "__version__"
Franz Glasner <fzglas.hg@dom66.de>
parents:
48
diff
changeset
|
16 # Determine "release" dynamically from the package's "__version__" |
|
5c0f26a21e81
Determine "release" dynamically from the package's "__version__"
Franz Glasner <fzglas.hg@dom66.de>
parents:
48
diff
changeset
|
17 with io.open("../pygments_lexer_pseudocode2/__init__.py", |
|
5c0f26a21e81
Determine "release" dynamically from the package's "__version__"
Franz Glasner <fzglas.hg@dom66.de>
parents:
48
diff
changeset
|
18 "rt", |
|
5c0f26a21e81
Determine "release" dynamically from the package's "__version__"
Franz Glasner <fzglas.hg@dom66.de>
parents:
48
diff
changeset
|
19 encoding="utf-8") as relfp: |
|
5c0f26a21e81
Determine "release" dynamically from the package's "__version__"
Franz Glasner <fzglas.hg@dom66.de>
parents:
48
diff
changeset
|
20 release = ast.literal_eval( |
|
5c0f26a21e81
Determine "release" dynamically from the package's "__version__"
Franz Glasner <fzglas.hg@dom66.de>
parents:
48
diff
changeset
|
21 re.search(r"""^\s*__version__\s*=\s*(("|')[^"']*\2)""", |
|
5c0f26a21e81
Determine "release" dynamically from the package's "__version__"
Franz Glasner <fzglas.hg@dom66.de>
parents:
48
diff
changeset
|
22 relfp.read(), |
|
5c0f26a21e81
Determine "release" dynamically from the package's "__version__"
Franz Glasner <fzglas.hg@dom66.de>
parents:
48
diff
changeset
|
23 re.MULTILINE) |
|
5c0f26a21e81
Determine "release" dynamically from the package's "__version__"
Franz Glasner <fzglas.hg@dom66.de>
parents:
48
diff
changeset
|
24 .group(1) |
|
5c0f26a21e81
Determine "release" dynamically from the package's "__version__"
Franz Glasner <fzglas.hg@dom66.de>
parents:
48
diff
changeset
|
25 ) |
|
51
b4c255f8bdc4
Also define "version" (identical to "release" yet)
Franz Glasner <fzglas.hg@dom66.de>
parents:
50
diff
changeset
|
26 version = release |
|
b4c255f8bdc4
Also define "version" (identical to "release" yet)
Franz Glasner <fzglas.hg@dom66.de>
parents:
50
diff
changeset
|
27 del relfp |
|
45
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
28 |
|
60
0ff291eac663
Minimal Sphinx configuration for the first tests
Franz Glasner <fzglas.hg@dom66.de>
parents:
51
diff
changeset
|
29 |
|
45
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
30 # -- General configuration --------------------------------------------------- |
|
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
31 # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
|
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
32 |
|
60
0ff291eac663
Minimal Sphinx configuration for the first tests
Franz Glasner <fzglas.hg@dom66.de>
parents:
51
diff
changeset
|
33 extensions = [ |
|
0ff291eac663
Minimal Sphinx configuration for the first tests
Franz Glasner <fzglas.hg@dom66.de>
parents:
51
diff
changeset
|
34 "sphinx.ext.todo", |
|
0ff291eac663
Minimal Sphinx configuration for the first tests
Franz Glasner <fzglas.hg@dom66.de>
parents:
51
diff
changeset
|
35 ] |
|
45
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
36 |
|
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
37 templates_path = ['_templates'] |
|
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
38 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] |
|
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
39 |
|
60
0ff291eac663
Minimal Sphinx configuration for the first tests
Franz Glasner <fzglas.hg@dom66.de>
parents:
51
diff
changeset
|
40 |
|
0ff291eac663
Minimal Sphinx configuration for the first tests
Franz Glasner <fzglas.hg@dom66.de>
parents:
51
diff
changeset
|
41 # --- Options for todo extension --------------------------------------------- |
|
0ff291eac663
Minimal Sphinx configuration for the first tests
Franz Glasner <fzglas.hg@dom66.de>
parents:
51
diff
changeset
|
42 todo_include_todos = True |
|
45
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
43 |
|
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
44 |
|
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
45 # -- Options for HTML output ------------------------------------------------- |
|
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
46 # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
|
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
47 |
|
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
48 html_theme = 'alabaster' |
|
60
0ff291eac663
Minimal Sphinx configuration for the first tests
Franz Glasner <fzglas.hg@dom66.de>
parents:
51
diff
changeset
|
49 html_theme = 'haiku' |
|
45
6ac1ea5d2d4a
Begin documentation: add the Sphinx generated configuration as-is
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
50 html_static_path = ['_static'] |
|
60
0ff291eac663
Minimal Sphinx configuration for the first tests
Franz Glasner <fzglas.hg@dom66.de>
parents:
51
diff
changeset
|
51 #pygments_style = "sphinx" |
|
0ff291eac663
Minimal Sphinx configuration for the first tests
Franz Glasner <fzglas.hg@dom66.de>
parents:
51
diff
changeset
|
52 pygments_style = "default" |
