From 596d2f0cf1bc253719898133bcad293743374417 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 11 Apr 2020 14:56:30 +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 - Cleanup doc/source/conf.py to remove now obsolete content. - Use newer openstackdocstheme version - Remove install_command from tox.ini, the default is fine Change-Id: Ied0e774f0efda76794ecfb0f67a5fd51bb380258 --- doc/requirements.txt | 2 +- doc/source/conf.py | 12 +----------- setup.cfg | 10 ++-------- setup.py | 9 --------- tox.ini | 1 - 5 files changed, 4 insertions(+), 30 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 12d19579..873037d8 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,6 +1,6 @@ # The order of packages is significant, because pip processes them in the order # 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 +openstackdocstheme>=1.31.2 # Apache-2.0 reno>=2.5.0 # Apache-2.0 sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index 45f34d32..398a7196 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -1,7 +1,3 @@ -import subprocess -import sys -import os - # 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. @@ -14,7 +10,7 @@ import os # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', +extensions = [ 'sphinx.ext.todo', 'sphinx.ext.viewcode', 'openstackdocstheme' @@ -108,12 +104,6 @@ html_theme = 'openstackdocs' # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local", - "-n1"] -html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8') - # 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 e3877849..b566cad3 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.5 Programming Language :: Python :: 3.6 @@ -29,11 +31,3 @@ console_scripts = wsgi_scripts = openstack-health = openstack_health.api:get_app - -[build_sphinx] -all_files = 1 -build-dir = doc/build -source-dir = doc/source - -[wheel] -universal = 1 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 15be7348..6401dde0 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,6 @@ ignore_basepython_conflict = True basepython = python3 setenv = VIRTUAL_ENV={envdir} usedevelop = True -install_command = pip install -U {opts} {packages} whitelist_externals = * deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt