From ddaa0a1e0ed32cc9ddb56a4b9093d2b1dbb80a69 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 21 Apr 2020 08:18:59 +0200 Subject: [PATCH] Cleanup py27 support This repo is now testing only with Python 3, so let's make a few cleanups: - Remove python 2.7 stanza from setup.py - Remove obsolete sections from setup.cfg - Update classifiers - Update requirements, no need for python_version anymore - Switch to using sphinx-build - Use newer openstackdocstheme and Sphinx versions - Cleanup */source/conf.py to remove now obsolete content. Change-Id: Icf69fa99ed77a0935062ee4fc8e9c6a195b381e5 --- doc/requirements.txt | 4 ++-- doc/source/conf.py | 4 +--- releasenotes/source/conf.py | 4 +--- setup.cfg | 11 ++--------- setup.py | 9 --------- tox.ini | 9 ++++----- 6 files changed, 10 insertions(+), 31 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 31506b20..6fccf089 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -2,8 +2,8 @@ # 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 -sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD +openstackdocstheme>=2.0.0 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD reno>=2.5.0 # Apache-2.0 sphinxcontrib-httpdomain>=1.3.0 # BSD sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index dc069028..5008452b 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -43,9 +43,7 @@ copyright = u'2017, OpenStack Developers' # openstackdocstheme options repository_name = 'openstack/heat-dashboard' -bug_project = '992' -bug_tag = 'doc' -html_last_updated_fmt = '%Y-%m-%d %H:%M' +use_storyboard = True # If true, '()' will be appended to :func: etc. cross-reference text. add_function_parentheses = True diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 709f79c0..97707707 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -57,9 +57,7 @@ copyright = u'2017, OpenStack Foundation' # openstackdocstheme options repository_name = 'openstack/heat-dashboard' -bug_project = 'heat-dashboard' -bug_tag = 'doc' -html_last_updated_fmt = '%Y-%m-%d %H:%M' +use_storyboard = True # Release notes are version independent, no need to set version and release release = '' diff --git a/setup.cfg b/setup.cfg index eaedbb3e..54047966 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,6 +14,8 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python + Programming Language :: Python :: Implementation :: CPython + Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 @@ -21,12 +23,3 @@ classifier = [files] packages = heat_dashboard - -[build_sphinx] -source-dir = doc/source -build-dir = doc/build -all_files = 1 -warning-is-error = 1 - -[upload_sphinx] -upload-dir = doc/build/html diff --git a/setup.py b/setup.py index 566d8443..cd35c3c3 100644 --- a/setup.py +++ b/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) diff --git a/tox.ini b/tox.ini index 943de4da..2a77b96b 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,7 @@ setenv = NOSE_OPENSTACK_RED=0.05 NOSE_OPENSTACK_YELLOW=0.025 NOSE_OPENSTACK_SHOW_ELAPSED=1 -deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} +deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = @@ -45,9 +45,9 @@ commands = coverage html [testenv:docs] -deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} +deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt -commands = python setup.py build_sphinx +commands = sphinx-build -W -b html doc/source doc/build/html [testenv:pdf-docs] basepython = python3 @@ -60,8 +60,7 @@ commands = make -C doc/build/pdf [testenv:releasenotes] -deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} - -r{toxinidir}/doc/requirements.txt +deps = {[testenv:docs]deps} commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html # Temporary disabled to pass the pep8 job