From 02a28cce854664f0e808fab2607503d1c9a90e25 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 2 Jun 2020 13:50:00 +0200 Subject: [PATCH] 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: Ie53af423c56f3355e7e911e6f2efd6c73c6d57c5 --- doc/requirements.txt | 6 +++--- doc/source/conf.py | 25 +++++-------------------- releasenotes/source/conf.py | 14 +++++--------- test-requirements.txt | 2 +- 4 files changed, 14 insertions(+), 33 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 701bdb1..0673b3d 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,6 +1,6 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -openstackdocstheme>=1.18.1 # Apache-2.0 -reno>=2.5.0 # Apache-2.0 -sphinx>=2.0.0 # BSD +openstackdocstheme>=2.2.1 # Apache-2.0 +reno>=3.1.0 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index a9171d5..d3b088a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -12,7 +12,6 @@ # serve to show the default. import datetime -import subprocess # make openstackdocstheme an optional dependency. stevedore is a low level lib # that is used outside of OpenStack. Not having something OpenStack specific @@ -47,10 +46,10 @@ if has_openstackdocstheme: extensions.append('openstackdocstheme') # openstackdocstheme options -repository_name = 'openstack/stevedore' -bug_project = 'python-stevedore' -bug_tag = '' -html_last_updated_fmt = '%Y-%m-%d %H:%M' +openstackdocs_repo_name = 'openstack/stevedore' +openstackdocs_auto_name = False +openstackdocs_bug_project = 'python-stevedore' +openstackdocs_bug_tag = '' # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -68,16 +67,6 @@ master_doc = 'index' project = u'stevedore' copyright = u'2016, DreamHost' -# 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. @@ -108,7 +97,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 = [] @@ -151,10 +140,6 @@ if has_openstackdocstheme: # 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 = '%b %d, %Y' - # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index ec88d0c..e59270e 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -40,10 +40,10 @@ extensions = [ ] # openstackdocstheme options -repository_name = 'openstack/stevedore' -bug_project = 'python-stevedore' -bug_tag = '' -html_last_updated_fmt = '%Y-%m-%d %H:%M' +openstackdocs_repo_name = 'openstack/stevedore' +openstackdocs_auto_name = False +openstackdocs_bug_project = 'python-stevedore' +openstackdocs_bug_tag = '' # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -98,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 = [] @@ -147,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 = '%b %d, %Y' - # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True diff --git a/test-requirements.txt b/test-requirements.txt index 11808ac..c4a563f 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,4 +6,4 @@ mock>=2.0.0 # BSD coverage!=4.4,>=4.0 # Apache-2.0 stestr>=2.0.0 # Apache-2.0 # sphinx is needed for testing the sphinxext module -sphinx>=2.0.0 # BSD +sphinx>=2.0.0,!=2.1.0 # BSD