Switch to newer openstackdocstheme and reno versions

Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I6254b8b17eea752a5b1d6031c89de47ecc865a49
This commit is contained in:
Andreas Jaeger 2020-06-02 13:54:52 +02:00
parent 94bf257392
commit 69fc39083f
3 changed files with 13 additions and 31 deletions

View File

@ -1,6 +1,6 @@
sphinx!=1.6.6,!=1.6.7,>=1.6.2,!=2.1.0 # BSD
openstackdocstheme>=1.11.0 # Apache-2.0
reno>=1.8.0 # Apache-2.0
sphinx>=2.0.0,!=2.1.0 # BSD
openstackdocstheme>=2.2.1 # Apache-2.0
reno>=3.1.0 # Apache-2.0
# Install dependencies for tooz so that autodoc works.
python-consul>=0.4.7 # MIT License

View File

@ -11,7 +11,6 @@
# serve to show the default.
import datetime
import subprocess
# 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
@ -37,9 +36,10 @@ extensions = [
]
# openstackdocstheme options
repository_name = 'openstack/tooz'
bug_project = 'tooz'
bug_tag = ''
openstackdocs_repo_name = 'openstack/tooz'
openstackdocs_auto_name = False
openstackdocs_bug_project = 'tooz'
openstackdocs_bug_tag = ''
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@ -57,17 +57,6 @@ master_doc = 'index'
project = u'tooz'
copyright = u'%s, OpenStack Foundation' % datetime.date.today().year
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = subprocess.Popen(['sh', '-c', 'cd ../..; python setup.py --version'],
stdout=subprocess.PIPE).stdout.read().decode('utf-8')
version = version.strip()
# The full version, including alpha/beta/rc tags.
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
@ -97,7 +86,7 @@ exclude_patterns = []
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = 'native'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
@ -138,10 +127,6 @@ html_theme = 'openstackdocs'
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True

View File

@ -40,9 +40,10 @@ extensions = [
]
# openstackdocstheme options
repository_name = 'openstack/tooz'
bug_project = 'tooz'
bug_tag = ''
openstackdocs_repo_name = 'openstack/tooz'
openstackdocs_auto_name = False
openstackdocs_bug_project = 'tooz'
openstackdocs_bug_tag = ''
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@ -97,7 +98,7 @@ exclude_patterns = []
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = 'native'
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
@ -146,10 +147,6 @@ html_static_path = ['_static']
# directly to the root of the documentation.
# html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
# html_use_smartypants = True