From 9fddc46bdc749e0433bd925ae8adb7bbdc53e005 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 16 Apr 2020 18:47:01 +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 requirements, no need for python_version anymore - Switch to using sphinx-build - Cleanup doc/source/conf.py to remove now obsolete content. - Use newer openstackdocstheme version - Remove install_command from tox.ini, the default is fine - Update hacking to version 3 Change-Id: I7e9e3993aeb05fb623be531160e418572fa9de54 --- doc/source/conf.py | 1 - setup.cfg | 9 --------- setup.py | 9 --------- test-requirements.txt | 6 +++--- tox.ini | 7 ++++--- 5 files changed, 7 insertions(+), 25 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 8fe8777..dc9a334 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -61,7 +61,6 @@ pygments_style = 'sphinx' # html_theme = '_theme' # html_static_path = ['static'] html_theme = 'openstackdocs' -html_last_updated_fmt = '%Y-%m-%d %H:%M' # Output file base name for HTML help builder. htmlhelp_basename = 'ironic-python-agent-builderdoc' diff --git a/setup.cfg b/setup.cfg index 051f7be..7b142e5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,12 +23,3 @@ packages = # TODO(dtantsur): figure out a sane way to distribute tinyipa scripts data_files = share/ironic-python-agent-builder/dib = dib/* - -[build_sphinx] -all-files = 1 -warning-is-error = 1 -source-dir = doc/source -build-dir = doc/build - -[upload_sphinx] -upload-dir = doc/build/html diff --git a/setup.py b/setup.py index 566d844..cd35c3c 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/test-requirements.txt b/test-requirements.txt index 7a4744a..266da87 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,11 +3,11 @@ # process, which may cause wedges in the gate later. # pep8 -hacking>=1.0.0,<1.2.0 # Apache-2.0 +hacking>=3.0,<3.1.0 # Apache-2.0 flake8-import-order>=0.13 # LGPLv3 # documentation doc8>=0.6.0 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD -openstackdocstheme>=1.20.0 # Apache-2.0 +sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD +openstackdocstheme>=1.31.2 # Apache-2.0 # releasenotes reno>=2.5.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 465c8f6..06d9c15 100644 --- a/tox.ini +++ b/tox.ini @@ -5,12 +5,13 @@ skipsdist = True [testenv] usedevelop = True -install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages} basepython = python3 setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning -deps = -r{toxinidir}/test-requirements.txt +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/test-requirements.txt [testenv:pep8] commands = @@ -21,7 +22,7 @@ commands = commands = {posargs} [testenv:docs] -commands = python setup.py build_sphinx +commands = sphinx-build -W -b html doc/source doc/build/html [testenv:pdf-docs] whitelist_externals = make