From d65bd2f88936fc618ec0ece681d997096dfed8fc Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 13 Apr 2020 11:04:32 +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 - Switch to using sphinx-build, switch to use openstackdocstheme and update requirements Change-Id: I67ba5ceb1728ee16b866ecf1b71cbf545a01b7d9 --- README.rst | 1 + doc/source/conf.py | 11 +++++++++-- setup.cfg | 11 ++--------- setup.py | 9 --------- test-requirements.txt | 4 ++-- tox.ini | 2 +- 6 files changed, 15 insertions(+), 23 deletions(-) diff --git a/README.rst b/README.rst index bf7910c..6a3a609 100644 --- a/README.rst +++ b/README.rst @@ -75,6 +75,7 @@ Run all tests:: Run specific test:: $ run-tempest-stress -t ./tempest_stress/etc/server-create-destroy-test.json -d 30 + This sample test tries to create a few VMs and kill a few VMs. For more information please refer run-tempest-stress CLI help:: diff --git a/doc/source/conf.py b/doc/source/conf.py index 77280ea..5d111af 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -23,7 +23,7 @@ sys.path.insert(0, os.path.abspath('../..')) extensions = [ 'sphinx.ext.autodoc', #'sphinx.ext.intersphinx', - 'oslosphinx' + 'openstackdocstheme' ] # autodoc generation is a bit aggressive and a nuisance when doing heavy @@ -50,12 +50,19 @@ add_module_names = True # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' +# openstackdocstheme options +repository_name = 'openstack/tempest-stress' +bug_project = 'tempest' +bug_tag = 'doc' + # -- Options for HTML output -------------------------------------------------- # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. # html_theme_path = ["."] # html_theme = '_theme' +html_theme = 'openstackdocs' + # html_static_path = ['static'] # Output file base name for HTML help builder. @@ -72,4 +79,4 @@ latex_documents = [ ] # Example configuration for intersphinx: refer to the Python standard library. -#intersphinx_mapping = {'http://docs.python.org/': None} \ No newline at end of file +#intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/setup.cfg b/setup.cfg index b884c09..70661c3 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.6 Programming Language :: Python :: 3.7 @@ -26,15 +28,6 @@ packages = console_scripts = run-tempest-stress = tempest_stress.cmd.run_stress:main - -[build_sphinx] -source-dir = doc/source -build-dir = doc/build -all_files = 1 - -[upload_sphinx] -upload-dir = doc/build/html - [compile_catalog] directory = tempest_stress/locale domain = tempest_stress diff --git a/setup.py b/setup.py index 056c16c..f76858d 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'], pbr=True) diff --git a/test-requirements.txt b/test-requirements.txt index 66a7893..d780cea 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,8 +7,8 @@ hacking>=3.0,<3.1.0 # Apache-2.0 coverage>=3.6 # Apache-2.0 stestr>=1.0.0 # Apache-2.0 python-subunit>=0.0.18 # Apache-2.0/BSD -sphinx!=1.3b1,<1.3,>=1.2.1 # BSD -oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0 +sphinx>=2.0.0 # BSD +openstackdocstheme>=2.0.0 # Apache-2.0 oslotest>=1.10.0 # Apache-2.0 testrepository>=0.0.18 # Apache-2.0/BSD testtools>=1.4.0 # MIT diff --git a/tox.ini b/tox.ini index af2c577..72f9c0c 100644 --- a/tox.ini +++ b/tox.ini @@ -40,7 +40,7 @@ commands = coverage xml -o cover/coverage.xml [testenv:docs] -commands = python setup.py build_sphinx +commands = sphinx-build -W -b html doc/source doc/build/html [testenv:debug] commands = oslo_debug_helper {posargs}