From e8baac7693727f86889171e479d4ec435f118641 Mon Sep 17 00:00:00 2001 From: melissaml Date: Tue, 14 Apr 2020 20:36:32 +0800 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 - Cleanup doc/source/conf.py to remove noww obsolete content. Change-Id: I6f85271e1750d6fa9006847feb18a1390f9048ea --- doc/source/conf.py | 18 ------------------ setup.cfg | 11 ----------- setup.py | 9 --------- tox.ini | 2 +- 4 files changed, 1 insertion(+), 39 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 3a32388..e76d042 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. @@ -66,22 +64,6 @@ role_name = 'nspawn_container_create' 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://git.openstack.org/cgit/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() diff --git a/setup.cfg b/setup.cfg index b2598b9..02f376e 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/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/tox.ini b/tox.ini index 31d3e39..90e4317 100644 --- a/tox.ini +++ b/tox.ini @@ -37,7 +37,7 @@ 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 [doc8] # Settings for doc8: