From 9a2f2d4b9caea39ec82823a8d9187f7ddd21aeab Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 4 Apr 2020 12:36:36 +0200 Subject: [PATCH] Cleanup py27 support Make a few cleanups: - Remove python 2.7 stanza from setup.py - Add requires on python >= 3.6 to setup.cfg so that pypi and pip know about the requirement - Remove obsolete sections from setup.cfg: * Wheel is not needed for python 3 only repo * Some other sections are obsolete - Update classifiers - Update requirements, no need for python_version anymore - Remove html_last_updated_fmt from conf.py, this is not needed with openstackdocstheme anymore; update openstackdocstheme requirement Change-Id: I5389ba08c985e023643c07adf3135809c291146f --- doc/requirements.txt | 3 +-- doc/source/conf.py | 1 - releasenotes/source/conf.py | 1 - setup.cfg | 18 +++--------------- setup.py | 9 --------- 5 files changed, 4 insertions(+), 28 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index fea43a05..b43db45d 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,7 +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. -sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD -sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD +sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD reno>=2.7.0 # Apache-2.0 openstackdocstheme>=1.18.1 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index ec015744..55ef25d6 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -12,7 +12,6 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'openstackdocstheme'] repository_name = 'openstack/python-designateclient' bug_project = 'python-designateclient' bug_tag = '' -html_last_updated_fmt = '%Y-%m-%d %H:%M' html_theme = 'openstackdocs' # Add any paths that contain templates here, relative to this directory. diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 68f01db4..c4400e5b 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -45,7 +45,6 @@ extensions = [ repository_name = 'openstack/python-designateclient' bug_project = 'python-designateclient' bug_tag = '' -html_last_updated_fmt = '%Y-%m-%d %H:%M' html_theme = 'openstackdocs' # Add any paths that contain templates here, relative to this directory. diff --git a/setup.cfg b/setup.cfg index 5686bf2f..67d622ee 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,6 +7,7 @@ license = Apache License, Version 2.0 author = OpenStack author-email = openstack-discuss@lists.openstack.org home-page = https://docs.openstack.org/python-designateclient/latest +python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -14,15 +15,13 @@ 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 Topic :: Internet :: Name Service (DNS) -[global] -setup-hooks = - pbr.hooks.setup_hook - [files] packages = designateclient @@ -100,14 +99,6 @@ openstack.dns.v2 = tsigkey_set = designateclient.v2.cli.tsigkeys:SetTSIGKeyCommand tsigkey_delete = designateclient.v2.cli.tsigkeys:DeleteTSIGKeyCommand - -[build_sphinx] -builders = html,man -all-files = 1 -warning-is-error = 1 -build-dir = doc/build -source-dir = doc/source - [egg_info] tag_build = tag_date = 0 @@ -127,9 +118,6 @@ keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel.cfg output_file = designateclient/locale/designateclient.pot -[wheel] -universal = 1 - [pbr] autodoc_index_modules = True api_doc_dir = reference/api 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)