Hide the "made with sphinx" doc footer

This commit is contained in:
Daniele Varrazzo 2020-01-18 19:37:13 +00:00
parent 5e0b02afb2
commit 584197f57d

View File

@ -11,7 +11,8 @@
# All configuration values have a default; values that are commented out # All configuration values have a default; values that are commented out
# serve to show the default. # serve to show the default.
import sys, os import os
import sys
# If extensions (or modules to document with autodoc) are in another directory, # If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the # add these directories to sys.path here. If the directory is relative to the
@ -22,8 +23,13 @@ sys.path.append(os.path.abspath('tools/lib'))
# Add any Sphinx extension module names here, as strings. They can be extensions # Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.ifconfig', extensions = [
'sphinx.ext.doctest', 'sphinx.ext.intersphinx' ] 'sphinx.ext.autodoc',
'sphinx.ext.todo',
'sphinx.ext.ifconfig',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
]
# Specific extensions for Psycopg documentation. # Specific extensions for Psycopg documentation.
extensions += ['dbapi_extension', 'sql_role', 'ticket_role'] extensions += ['dbapi_extension', 'sql_role', 'ticket_role']
@ -42,7 +48,9 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = u'Psycopg' project = u'Psycopg'
copyright = u'2001-2020, Federico Di Gregorio, Daniele Varrazzo, The Psycopg Team' copyright = (
u'2001-2020, Federico Di Gregorio, Daniele Varrazzo, The Psycopg Team'
)
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
@ -54,15 +62,14 @@ version = '2.0'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
try: try:
import psycopg2 import psycopg2
release = psycopg2.__version__.split()[0]
version = '.'.join(release.split('.')[:2])
except ImportError: except ImportError:
print("WARNING: couldn't import psycopg to read version.") print("WARNING: couldn't import psycopg to read version.")
release = version release = version
else:
release = psycopg2.__version__.split()[0]
version = '.'.join(release.split('.')[:2])
intersphinx_mapping = { intersphinx_mapping = {'py': ('https://docs.python.org/3', None)}
'py': ('https://docs.python.org/3', None),
}
# Pattern to generate links to the bug tracker # Pattern to generate links to the bug tracker
ticket_url = 'https://github.com/psycopg/psycopg2/issues/%s' ticket_url = 'https://github.com/psycopg/psycopg2/issues/%s'
@ -136,6 +143,9 @@ html_theme = 'classic'
# adding a few classes. # adding a few classes.
html_style = 'psycopg.css' html_style = 'psycopg.css'
# Hide the sphinx footer
html_show_sphinx = False
# Theme options are theme-specific and customize the look and feel of a theme # Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the # further. For a list of options available for each theme, see the
# documentation. # documentation.
@ -215,8 +225,13 @@ htmlhelp_basename = 'psycopgdoc'
# Grouping the document tree into LaTeX files. List of tuples # Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]). # (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [ latex_documents = [
('index', 'psycopg.tex', u'Psycopg Documentation', (
u'Federico Di Gregorio', 'manual'), 'index',
'psycopg.tex',
u'Psycopg Documentation',
u'Federico Di Gregorio',
'manual',
)
] ]
# The name of an image file (relative to this directory) to place at the top of # The name of an image file (relative to this directory) to place at the top of