From c91738740233fd742923d910fac45b429fd2239f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 4 Apr 2020 17:00:34 +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 - Use sphinx-build everywhere - Update classifiers - Update requirements, no need for python_version anymore Change-Id: I23a3b98e41099b74a4da95cc5c6e2d3171c0809c --- setup.cfg | 24 +++--------------------- setup.py | 9 --------- test-requirements.txt | 2 +- tox.ini | 4 ++-- 4 files changed, 6 insertions(+), 33 deletions(-) diff --git a/setup.cfg b/setup.cfg index 18c77cc..f83baa9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,6 +5,7 @@ description-file = README.rst author = OpenStack author-email = openstack-discuss@lists.openstack.org home-page = https://docs.openstack.org/python-monascaclient/latest/ +python-requires = >=3.6 classifier = Environment :: Console Intended Audience :: Information Technology @@ -12,8 +13,8 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python - Programming Language :: Python :: 2 - Programming Language :: Python :: 2.7 + Programming Language :: Python :: Implementation :: CPython + Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 @@ -24,22 +25,3 @@ packages = monascaclient [entry_points] console_scripts = monasca = monascaclient.shell:main - -[build_sphinx] -source-dir = doc/source -build-dir = doc/build -all_files = 1 -warning-is-error = 1 - -[build_releasenotes] -all_files = 1 -build-dir = releasenotes/build -source-dir = releasenotes/source - -[wheel] -universal = 1 - -[egg_info] -tag_build = -tag_date = 0 -tag_svn_revision = 0 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 0b214cc..0f7d6ce 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -13,6 +13,6 @@ testtools>=2.2.0 # MIT # documentation doc8>=0.6.0 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.5;python_version>='3.4' # BSD +sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.5 # BSD reno>=2.5.0 # Apache-2.0 openstackdocstheme>=1.18.1 # Apache-2.0 diff --git a/tox.ini b/tox.ini index b9ca7b3..2f6dc8c 100644 --- a/tox.ini +++ b/tox.ini @@ -67,13 +67,13 @@ commands = description = Builds developer documentation commands = rm -rf {toxinidir}/doc/build {toxinidir}/doc/source/contributor/api - python setup.py build_sphinx + sphinx-build -a -W -b html doc/source doc/build/html [testenv:releasenotes] description = Called from CI script to test and publish the Release Notes commands = rm -rf releasenotes/build - sphinx-build -a -E -d {toxinidir}/releasenotes/build/doctrees -b html \ + sphinx-build -a -W -E -d {toxinidir}/releasenotes/build/doctrees -b html \ {toxinidir}/releasenotes/source {toxinidir}/releasenotes/build/html [testenv:checkniceness]