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
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg
- Update classifiers
- Update requirements, no need for python_version anymore
- Switch to using sphinx-build
- Use newer openstackdocstheme and Sphinx versions
- Cleanup */source/conf.py to remove now obsolete content.

Change-Id: Icab2b68608002968bbc56791faedd119db7516e7
This commit is contained in:
Andreas Jaeger 2020-04-17 19:56:28 +02:00 committed by Akihiro Motoki
parent d49e7ef3a3
commit 0f9a50ed8d
7 changed files with 9 additions and 39 deletions

View File

@ -22,15 +22,11 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
from __future__ import print_function
import os
import sys
import django
import neutron_fwaas_dashboard.version
PROJECT = 'neutron-fwaas-dashboard'
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", ".."))
@ -70,7 +66,6 @@ extensions = [
repository_name = 'openstack/neutron-fwaas-dashboard'
bug_project = 'neutron-fwaas-dashboard'
bug_tag = 'doc'
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@ -88,15 +83,6 @@ master_doc = 'index'
project = u'Neutron FWaaS Dashboard'
copyright = u'2017, OpenStack Foundation'
# 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 = neutron_fwaas_dashboard.version.version_info.version_string()
# The full version, including alpha/beta/rc tags.
release = neutron_fwaas_dashboard.version.version_info.release_string()
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# language = None

View File

@ -50,7 +50,7 @@ msgpack-python==0.4.0
munch==2.1.0
netaddr==0.7.18
netifaces==0.10.4
openstackdocstheme==1.18.1
openstackdocstheme==2.0.0
openstacksdk==0.11.2
os-client-config==1.28.0
os-service-types==1.2.0
@ -109,7 +109,7 @@ semantic-version==2.3.1
simplejson==3.5.1
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.6.2
Sphinx==2.0.0
sphinxcontrib-websupport==1.0.1
statsd==3.2.1
stevedore==1.20.0

View File

@ -46,7 +46,6 @@ extensions = [
repository_name = 'openstack/neutron-fwaas-dashboard'
bug_project = 'neutron-fwaas-dashboard'
bug_tag = 'doc'
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# Add any paths that contain templates here, relative to this directory.
# templates_path = ['_templates']

View File

@ -6,6 +6,7 @@ description-file =
author = OpenStack
author-email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/neutron-fwaas-dashboard/latest/
python-requires = >=3.6
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
@ -13,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
@ -20,12 +23,3 @@ classifier =
[files]
packages =
neutron_fwaas_dashboard
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all-files = 1
warning-is-error = 1
[upload_sphinx]
upload-dir = doc/build/html

View File

@ -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)

View File

@ -8,9 +8,8 @@ hacking>=3.0,<3.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
flake8-import-order==0.13 # LGPLv3
mock>=2.0.0 # BSD
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,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
openstackdocstheme>=1.18.1 # Apache-2.0
sphinx>=2.0.0,!=2.1.0 # BSD
openstackdocstheme>=2.0.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0
# integration tests requirements

View File

@ -49,7 +49,8 @@ basepython = python3
commands = {envpython} {toxinidir}/manage.py test neutron_fwaas_dashboard --tag integration {posargs}
[testenv:docs]
commands = python setup.py build_sphinx
commands =
sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
envdir = {toxworkdir}/docs