conf.py (3705B)
1 # This file is dual licensed under the terms of the Apache License, Version 2 # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 # for complete details. 4 5 import os 6 import sys 7 8 # If extensions (or modules to document with autodoc) are in another directory, 9 # add these directories to sys.path here. If the directory is relative to the 10 # documentation root, use os.path.abspath to make it absolute, like shown here. 11 sys.path.insert(0, os.path.abspath(".")) 12 13 # -- General configuration ---------------------------------------------------- 14 15 # Add any Sphinx extension module names here, as strings. They can be 16 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 17 extensions = [ 18 "sphinx.ext.autodoc", 19 "sphinx.ext.doctest", 20 "sphinx.ext.extlinks", 21 "sphinx.ext.intersphinx", 22 "sphinx.ext.viewcode", 23 ] 24 25 # Add any paths that contain templates here, relative to this directory. 26 templates_path = ["_templates"] 27 28 # The suffix of source filenames. 29 source_suffix = ".rst" 30 31 # The master toctree document. 32 master_doc = "index" 33 34 # General information about the project. 35 project = "Packaging" 36 37 # The version info for the project you're documenting, acts as replacement for 38 # |version| and |release|, also used in various other places throughout the 39 # built documents. 40 # 41 42 base_dir = os.path.join(os.path.dirname(__file__), os.pardir) 43 about = {} 44 with open(os.path.join(base_dir, "packaging", "__about__.py")) as f: 45 exec(f.read(), about) 46 47 version = release = about["__version__"] 48 copyright = about["__copyright__"] 49 50 # List of patterns, relative to source directory, that match files and 51 # directories to ignore when looking for source files. 52 exclude_patterns = ["_build"] 53 54 extlinks = { 55 "issue": ("https://github.com/pypa/packaging/issues/%s", "#"), 56 "pull": ("https://github.com/pypa/packaging/pull/%s", "PR #"), 57 } 58 # -- Options for HTML output -------------------------------------------------- 59 60 # The theme to use for HTML and HTML Help pages. See the documentation for 61 # a list of builtin themes. 62 63 html_theme = "furo" 64 html_title = "packaging" 65 66 # Add any paths that contain custom static files (such as style sheets) here, 67 # relative to this directory. They are copied after the builtin static files, 68 # so a file named "default.css" will overwrite the builtin "default.css". 69 html_static_path = ["_static"] 70 71 # Output file base name for HTML help builder. 72 htmlhelp_basename = "packagingdoc" 73 74 75 # -- Options for LaTeX output ------------------------------------------------- 76 77 latex_elements = {} 78 79 # Grouping the document tree into LaTeX files. List of tuples 80 # (source start file, target name, title, author, documentclass [howto/manual]) 81 latex_documents = [ 82 ("index", "packaging.tex", "Packaging Documentation", "Donald Stufft", "manual") 83 ] 84 85 # -- Options for manual page output ------------------------------------------- 86 87 # One entry per manual page. List of tuples 88 # (source start file, name, description, authors, manual section). 89 man_pages = [("index", "packaging", "Packaging Documentation", ["Donald Stufft"], 1)] 90 91 # -- Options for Texinfo output ----------------------------------------------- 92 93 # Grouping the document tree into Texinfo files. List of tuples 94 # (source start file, target name, title, author, 95 # dir menu entry, description, category) 96 texinfo_documents = [ 97 ( 98 "index", 99 "packaging", 100 "Packaging Documentation", 101 "Donald Stufft", 102 "packaging", 103 "Core utilities for Python packages", 104 "Miscellaneous", 105 ) 106 ] 107 108 # Example configuration for intersphinx: refer to the Python standard library. 109 intersphinx_mapping = {"https://docs.python.org/": None} 110 111 epub_theme = "epub"