File 0001-Switch-from-oslosphinx-to-openstackdocstheme.patch of Package python-dracclient
From b4c304c5d61a044f3e57025a5e5b729550458dc5 Mon Sep 17 00:00:00 2001
From: Thomas Bechtold <tbechtold@suse.com>
Date: Mon, 7 Oct 2019 14:26:47 +0200
Subject: [PATCH] Switch from oslosphinx to openstackdocstheme
That's what the OpenStack community is using today. Also with newer
Sphinx versions, the current approach does no longer build.
Change-Id: Iab9f72bb146e8dd36de7fa868b41801e0c97e2ea
---
doc/source/conf.py | 6 +++++-
test-requirements.txt | 5 +++--
tox.ini | 5 +++--
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/doc/source/conf.py b/doc/source/conf.py
index e6c81e8..6665e41 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -21,7 +21,7 @@ sys.path.insert(0, os.path.abspath('../..'))
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
- 'oslosphinx'
+ 'openstackdocstheme'
]
# autodoc generation is a bit aggressive and a nuisance when doing heavy
@@ -55,6 +55,7 @@ pygments_style = 'sphinx'
# html_theme_path = ["."]
# html_theme = '_theme'
# html_static_path = ['static']
+html_theme = 'openstackdocs'
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
@@ -71,3 +72,6 @@ latex_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None}
+
+# openstackdocstheme options
+repository_name = 'openstack/python-dracclient'
diff --git a/test-requirements.txt b/test-requirements.txt
index 1ec2d76..ca569aa 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -7,5 +7,6 @@ doc8
hacking>=1.1.0,<1.2.0 # Apache-2.0
mock>=2.0
requests-mock>=1.0
-sphinx>=1.2.1,!=1.3b1,<1.3
-oslosphinx>=2.5.0,!=3.4.0
+sphinx!=1.6.6,!=1.6.7,<2.0.0;python_version=='2.7' # BSD
+sphinx!=1.6.6,!=1.6.7,!=2.1.0;python_version>='3.4' # BSD
+openstackdocstheme # Apache-2.0
diff --git a/tox.ini b/tox.ini
index 54905c2..b5c7036 100644
--- a/tox.ini
+++ b/tox.ini
@@ -25,8 +25,9 @@ commands =
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/requirements.txt
- -r{toxinidir}/doc/requirements.txt
-commands = python setup.py build_sphinx
+ -r{toxinidir}/test-requirements.txt
+commands =
+ sphinx-build -b html doc/source doc/build/html
[flake8]
max-complexity=15
--
2.23.0