From 750bfc8e152e9abcac1489dd3bd6e24c6429eea2 Mon Sep 17 00:00:00 2001 From: melissaml Date: Tue, 14 Apr 2020 15:04:29 +0800 Subject: [PATCH] Cleanup py27 support This repo is now testing only with Python 3, so let's make a few cleanups: - Remove obsolete sections from setup.cfg - Use warnings for sphinx-build - Cleanup doc/source/conf.py to remove now obsolete content. Change-Id: I49d20c142af9345125540de61e9476f317ab6a38 --- doc/source/conf.py | 22 ---------------------- setup.cfg | 11 ----------- tox.ini | 4 ++-- 3 files changed, 2 insertions(+), 35 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index ae413d2..b3328dd 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -22,8 +22,6 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import pbr.version - # 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 # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -67,22 +65,6 @@ role_name = 'os_congress' target_name = 'openstack-ansible-' + role_name title = 'OpenStack-Ansible Documentation: ' + role_name + ' role' -# The link to the browsable source code (for the left hand menu) -oslosphinx_cgit_link = ( - "https://opendev.org/openstack/{}".format(target_name) -) - -# 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_info = pbr.version.VersionInfo(target_name) -# The full version, including alpha/beta/rc tags. -release = version_info.version_string_with_vcs() -# The short X.Y version. -version = version_info.canonical_version_string() - # openstackdocstheme options repository_name = 'openstack/' + target_name bug_project = project.lower() @@ -172,10 +154,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 diff --git a/setup.cfg b/setup.cfg index f350afc..24bdf1b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,14 +11,3 @@ classifier = Intended Audience :: System Administrators License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux - -[build_sphinx] -all_files = 1 -build-dir = doc/build -source-dir = doc/source - -[pbr] -warnerrors = True - -[wheel] -universal = 1 diff --git a/tox.ini b/tox.ini index e7a3739..18f0233 100644 --- a/tox.ini +++ b/tox.ini @@ -34,14 +34,14 @@ deps = -r{toxinidir}/doc/requirements.txt commands = bash -c "rm -rf doc/build" doc8 doc - sphinx-build --keep-going -b html doc/source doc/build/html + sphinx-build -W --keep-going -b html doc/source doc/build/html [testenv:pdf-docs] deps = {[testenv:docs]deps} whitelist_externals = make commands = - sphinx-build -W --keep-going -b latex doc/source doc/build/pdf + sphinx-build --keep-going -b latex doc/source doc/build/pdf make -C doc/build/pdf [doc8]