|
| 1 | +# Configuration file for the Sphinx documentation builder. |
| 2 | +# |
| 3 | +# This file only contains a selection of the most common options. For a full |
| 4 | +# list see the documentation: |
| 5 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html |
| 6 | + |
| 7 | +# -- Path setup -------------------------------------------------------------- |
| 8 | + |
| 9 | +# If extensions (or modules to document with autodoc) are in another directory, |
| 10 | +# add these directories to sys.path here. If the directory is relative to the |
| 11 | +# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 12 | +# |
| 13 | +import os |
| 14 | +import sys |
| 15 | +import mariadb |
| 16 | +from typing import Sequence |
| 17 | +from datetime import datetime |
| 18 | +print(mariadb.__path__) |
| 19 | +sys.path.insert(0, os.path.abspath('../..')) |
| 20 | +sys.setrecursionlimit(1500) |
| 21 | + |
| 22 | + |
| 23 | +# -- Project information ----------------------------------------------------- |
| 24 | + |
| 25 | +project = 'MariaDB Connector/Python' |
| 26 | +copyright = '2019-%s MariaDB Corporation and Georg Richter' % datetime.now().year |
| 27 | +author = 'Georg Richter' |
| 28 | + |
| 29 | +# The full version, including alpha/beta/rc tags |
| 30 | +release = mariadb.__version__ |
| 31 | +if len(mariadb.__version_info__) > 3: |
| 32 | + release= release + "-" + mariadb.__version_info__[3] |
| 33 | +add_module_names= False |
| 34 | + |
| 35 | + |
| 36 | +# -- General configuration --------------------------------------------------- |
| 37 | + |
| 38 | +# Add any Sphinx extension module names here, as strings. They can be |
| 39 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 40 | +# ones. |
| 41 | +extensions = ['sphinx.ext.doctest', 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', |
| 42 | + 'sphinx.ext.extlinks', 'sphinx_toolbox.collapse', 'myst_parser', 'sphinx_markdown_builder' ] |
| 43 | + |
| 44 | +# Add any paths that contain templates here, relative to this directory. |
| 45 | +templates_path = ['_templates'] |
| 46 | + |
| 47 | +# List of patterns, relative to source directory, that match files and |
| 48 | +# directories to ignore when looking for source files. |
| 49 | +# This pattern also affects html_static_path and html_extra_path. |
| 50 | +exclude_patterns = [] |
| 51 | + |
| 52 | +pygments_style = 'sphinx' |
| 53 | + |
| 54 | +master_doc = 'index' |
| 55 | + |
| 56 | +# Enable Markdown support via MyST-Parser |
| 57 | +source_suffix = { |
| 58 | + '.rst': 'restructuredtext', |
| 59 | + '.md': 'markdown', |
| 60 | +} |
| 61 | + |
| 62 | +# Optional: Enable MyST extensions (customize as needed) |
| 63 | +myst_enable_extensions = [ |
| 64 | + "colon_fence", |
| 65 | + "deflist", |
| 66 | + "html_admonition", |
| 67 | + "html_image", |
| 68 | + "linkify", |
| 69 | + "substitution", |
| 70 | + "tasklist", |
| 71 | +] |
| 72 | + |
| 73 | + |
| 74 | +# -- Options for HTML output ------------------------------------------------- |
| 75 | + |
| 76 | +# The theme to use for HTML and HTML Help pages. See the documentation for |
| 77 | +# a list of builtin themes. |
| 78 | +# |
| 79 | +html_theme = 'classic' |
| 80 | + |
| 81 | +# Add any paths that contain custom static files (such as style sheets) here, |
| 82 | +# relative to this directory. They are copied after the builtin static files, |
| 83 | +# so a file named "default.css" will overwrite the builtin "default.css". |
| 84 | +html_static_path = ['_static'] |
| 85 | +html_show_sourcelink = False |
| 86 | + |
| 87 | +highlight_language = 'python' |
| 88 | + |
| 89 | +rst_epilog=""" |
| 90 | +.. |MCP| replace:: MariaDB Connector/Python |
| 91 | +.. |MCC| replace:: MariaDB Connector/C |
| 92 | +.. |MCC_minversion| replace:: 3.3.1 |
| 93 | +.. |DBAPI| replace:: DB API 2.0 (:PEP:`249`) |
| 94 | +.. |MCDP| replace:: `MariaDB Connector Download page <https://mariadb.com/downloads/connectors/>`__ |
| 95 | +""" |
| 96 | + |
| 97 | +extlinks= { |
| 98 | + 'conpy' : ('https://jira.mariadb.org/browse/CONPY-%s', 'CONPY-%s'), |
| 99 | + 'PEP' : ('https://peps.python.org/pep-%s', 'PEP-%s') |
| 100 | + } |
0 commit comments