From d2f2144ebb6e7e701f8271493fdb54f3675a9fc6 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 5 Apr 2020 09:54:10 +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 - Use sphinx-build everywhere - Remove py27 testing, use victoria jobs template - Set ignore_basepython_conflict in tox.ini Change-Id: I8067cc94f5a8d29c836771173399f3ce71897ad8 --- .zuul.yaml | 3 +-- setup.cfg | 33 ++++----------------------------- setup.py | 9 --------- tox.ini | 5 +++-- 4 files changed, 8 insertions(+), 42 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index c72e2287..a41df255 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -3,8 +3,7 @@ - check-requirements - openstack-cover-jobs - openstack-lower-constraints-jobs - - openstack-python-jobs - - openstack-python36-jobs + - openstack-python3-victoria-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 check: diff --git a/setup.cfg b/setup.cfg index 42ef000d..9cc9b567 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,7 +5,8 @@ description-file = README.rst author = OpenStack author-email = openstack-discuss@lists.openstack.org -home-page = https://github.com/openstack/monasca-log-api +home-page = https://docs.openstack.org/monasca-log-api/latest/ +python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -13,14 +14,12 @@ 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 -[global] -setup-hooks = - pbr.hooks.setup_hook - [files] packages = monasca_log_api @@ -43,35 +42,11 @@ oslo.config.opts = oslo.policy.policies = monasca_log_api = monasca_log_api.policies:list_rules -[build_sphinx] -all_files = 1 -build-dir = doc/build -source-dir = doc/source -warning-is-error = 1 - -[build_apiguide] -all_files = 1 -build-dir = api-guide/build -source-dir = api-guide/source - -[build_apiref] -all_files = 1 -build-dir = api-ref/build -source-dir = api-ref/source - -[build_releasenotes] -all_files = 1 -build-dir = releasenotes/build -source-dir = releasenotes/source - [egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 -[wheel] -universal = 1 - [pbr] autodoc_index_modules = True autodoc_exclude_modules = 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 e86ab3b8..cc43ce7f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] envlist = py37,pep8,cover -minversion = 2.7 +minversion = 3.1.1 +ignore_basepython_conflict = True skipsdist = True [testenv] @@ -111,7 +112,7 @@ commands = rm -rf doc/build rm -rf doc/source/contributor/api {[testenv:checkjson]commands} - python setup.py build_sphinx + sphinx-build -a -E -d doc/build/doctrees -b html doc/source doc/build/html [testenv:checkniceness] description = Validates (pep-like) documenation