Browse Source

Switch to newer openstackdocstheme version

Switch to openstackdocstheme 2.2.1 version. Using
this version 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_version to not auto-version the documents.

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

Remove python 2.7 stanza from setup.py, cleanup tox.ini for python3,
update hacking version and fix problem found.

Change-Id: Ic0721e60f6583abb52bb665fbf113c8017318e2c
changes/54/734854/2
Andreas Jaeger 1 year ago
parent
commit
546b046800
  1. 4
      doc/requirements.txt
  2. 11
      doc/source/conf.py
  3. 8
      openstack_election/cmds/ci_check_all_candidate_files.py
  4. 9
      setup.py
  5. 2
      test-requirements.txt
  6. 3
      tox.ini

4
doc/requirements.txt

@ -2,5 +2,5 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
# needed for doc build
sphinx>=1.6.2 # BSD
openstackdocstheme>=1.25.1 # Apache-2.0
sphinx>=2.0.0,!=2.1.0 # BSD
openstackdocstheme>=2.2.1 # Apache-2.0

11
doc/source/conf.py

@ -57,6 +57,15 @@ master_doc = 'index'
project = u'OpenStack Election'
copyright = u'2015, OpenStack'
# openstackdocstheme options
openstackdocs_repo_name = 'openstack/election'
openstackdocs_auto_name = False
openstackdocs_auto_version = False
openstackdocs_bug_project = ''
openstackdocs_bug_tag = ''
version = ''
release = ''
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
@ -89,7 +98,7 @@ add_module_names = False
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 = []

8
openstack_election/cmds/ci_check_all_candidate_files.py

@ -85,10 +85,10 @@ def find_modified_candidate_files():
['git', 'diff', '--name-only', '--pretty=format:', 'HEAD^']
).decode('utf-8')
filenames = [
l.strip()
for l in results.splitlines()
if (l.startswith(utils.CANDIDATE_PATH + '/') and
not l.endswith('.placeholder'))
li.strip()
for li in results.splitlines()
if (li.startswith(utils.CANDIDATE_PATH + '/') and
not li.endswith('.placeholder'))
]
return filenames

9
setup.py

@ -13,17 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
import setuptools
# In python < 2.7.4, a lazy loading of package `pbr` will break
# setuptools if some other modules registered functions in `atexit`.
# solution from: http://bugs.python.org/issue15881#msg170215
try:
import multiprocessing # noqa
except ImportError:
pass
setuptools.setup(
setup_requires=['pbr>=2.0.0'],
pbr=True)

2
test-requirements.txt

@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
# needed for doc build
hacking>=2.0,<2.1 # Apache-2.0
hacking>=3.1.0,<3.2.0 # Apache-2.0
yamllint
mock>=2.0.0 # BSD
oslotest>=1.10.0 # Apache-2.0

3
tox.ini

@ -7,7 +7,6 @@ ignore_basepython_conflict=true
[testenv]
basepython = python3
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
@ -25,7 +24,7 @@ commands = {posargs}
[testenv:docs]
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -v -W -b html -d doc/build/doctrees doc/source doc/build/html

Loading…
Cancel
Save