From 1a8b52cc62060e428b6b589ea6b26d900c9aaec2 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 11 Apr 2020 14:59:57 +0200 Subject: [PATCH] Cleanup py27 support and docs This repo is now testing only with Python 3, so let's make a few cleanups: - Remove obsolete sections from setup.cfg - Update requirements, no need for python_version anymore - Cleanup */source/conf.py to remove now obsolete content. - Use newer openstackdocstheme version - Remove install_command from tox.ini, the default is fine - Use python3 in base environment in tox.ini Change-Id: I9fc6ae78b2159910665fc0fec3c7ea23130fbfef --- doc/source/conf.py | 19 +++---------------- releasenotes/source/conf.py | 3 --- requirements.txt | 2 +- setup.cfg | 9 --------- tox.ini | 4 +--- 5 files changed, 5 insertions(+), 32 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 4e68a81..c72c419 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -12,13 +12,6 @@ # 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. # -import os -import sys - -import pbr.version - -sys.path.insert(0, os.path.abspath('../..')) - # -- Project information ----------------------------------------------------- @@ -26,21 +19,15 @@ project = 'OpenStack-Helm' copyright = '2018, OpenStack-Helm Authors' author = 'OpenStack-Helm Authors' -version_info = pbr.version.VersionInfo('openstack-helm-docs') - -# The short X.Y version -version = version_info.canonical_version_string() -# The full version, including alpha/beta/rc tags -release = version_info.version_string_with_vcs() +# The repo is unversioned +version = '' +release = '' # -- General configuration --------------------------------------------------- # OpenStackDocsTheme options repository_name = 'openstack/openstack-helm-docs' -bug_project = '64' -bug_tag = '' -html_last_updated_fmt = '%Y-%m-%d %H:%M' use_storyboard = True # If your documentation needs a minimal Sphinx version, state it here. diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 5a2e5cd..86a55de 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -25,9 +25,6 @@ author = 'OpenStack Helm Docs Authors' # openstackdocstheme options repository_name = 'openstack/openstack-helm-docs' -bug_project = '64' -bug_tag = '' -html_last_updated_fmt = '%Y-%m-%d %H:%M' use_storyboard = True # The short X.Y version diff --git a/requirements.txt b/requirements.txt index 4193008..d98e09d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ pbr>=2.0.0 sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD -openstackdocstheme>=1.19.0 # Apache-2.0 +openstackdocstheme>=1.31.2 # Apache-2.0 # Releasenotes reno>=2.5.0 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index 0735aff..977f896 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,12 +10,3 @@ classifier = Intended Audience :: Developers License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux - -[build_sphinx] -all_files = 1 -build-dir = doc/build -source-dir = doc/source -warning-is-error = True - -[wheel] -universal = 1 diff --git a/tox.ini b/tox.ini index 006394f..47f23be 100644 --- a/tox.ini +++ b/tox.ini @@ -4,8 +4,8 @@ envlist = docs skipsdist = True [testenv] +basepython = python3 usedevelop = True -install_command = pip install -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} deps = @@ -16,11 +16,9 @@ whitelist_externals = rm [testenv:venv] -basepython = python3 commands = {posargs} [testenv:docs] -basepython = python3 deps = {[testenv]deps} description = Build main documentation.