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
- Cleanup doc/source/conf.py to remove now obsolete content.
- Use newer openstackdocstheme version
- Remove install_command from tox.ini, the default is fine,
  update constraints to current URL

Change-Id: I45fc7e79bc7abf266721d819f4f857d06a701724
This commit is contained in:
Andreas Jaeger 2020-04-12 17:49:42 +02:00 committed by Eyal
parent b1c1094da4
commit 13f2676a1f
8 changed files with 20 additions and 43 deletions

View File

@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
oslo.config>=5.2.0 # Apache-2.0
openstackdocstheme>=1.24.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
openstackdocstheme>=1.31.2 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD
reno>=2.7.0 # Apache-2.0
docutils>=0.11 # OSI-Approved Open Source, Public Domain

View File

@ -70,8 +70,7 @@ html_theme = 'openstackdocs'
# openstackdocstheme options
repository_name = 'openstack/vitrage'
use_storyborad = True
html_last_updated_fmt = '%Y-%m-%d %H:%M'
use_storyboard = True
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project

View File

@ -13,7 +13,6 @@ contextlib2==0.5.5
cotyledon==1.6.8
coverage==4.5.1
debtcollector==1.19.0
decorator==4.2.1
deprecation==2.0
dogpile.cache==0.6.5
dulwich==0.19.0
@ -32,7 +31,7 @@ Jinja2==2.10
jmespath==0.9.3
jsonpatch==1.21
jsonpointer==2.0
keystoneauth1==3.4.0
keystoneauth1==3.6.2
keystonemiddleware==4.21.0
kombu==4.1.0
linecache2==1.0.0
@ -48,8 +47,7 @@ msgpack==0.5.6
munch==2.2.0
netaddr==0.7.19
netifaces==0.10.6
networkx==2.3;python_version>='3.4'
networkx==2.0;python_version<'3.0'
networkx==2.3
openstacksdk==0.12.0
os-client-config==1.29.0
os-service-types==1.2.0
@ -60,7 +58,7 @@ oslo.config==5.2.0
oslo.context==2.20.0
oslo.db==4.35.0
oslo.i18n==3.20.0
oslo.log==3.37.0
oslo.log==3.44.0
oslo.messaging==5.36.0
oslo.middleware==3.35.0
oslo.policy==1.34.0

View File

@ -39,9 +39,7 @@ copyright = u'2016, Vitrage developers'
# openstackdocstheme options
repository_name = 'openstack/vitrage'
bug_project = 'vitrage'
bug_tag = ''
html_last_updated_fmt = '%Y-%m-%d %H:%M'
use_storyboard = True
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True

View File

@ -22,14 +22,14 @@ python-troveclient>=2.2.0 # Apache-2.0
python-zaqarclient >=1.2.0
gnocchiclient>=3.3.1 # Apache-2.0
pyzabbix>=0.7.4 # LGPL
networkx>=2.3;python_version>='3.4' # BSD
networkx>=2.3 # BSD
oslo.config>=5.2.0 # Apache-2.0
oslo.context>=2.20.0 # Apache-2.0
oslo.db>=4.35.0 # Apache-2.0
oslo.messaging>=5.36.0 # Apache-2.0
oslo.middleware>=3.35.0 # Apache-2.0
oslo.serialization>=2.25.0 # Apache-2.0
oslo.log>=3.37.0 # Apache-2.0
oslo.log>=3.44.0 # Apache-2.0
oslo.policy>=1.34.0 # Apache-2.0
oslo.i18n>=3.20.0 # Apache-2.0
oslo.upgradecheck>=0.1.1 # Apache-2.0
@ -44,7 +44,7 @@ sympy>=1.1.1 # BSD
pysnmp>=4.4.4 # BSD
PyJWT>=1.6.0 # MIT
osprofiler>=2.0.0 # Apache-2.0
keystoneauth1>=3.4.0 # Apache-2.0
keystoneauth1>=3.6.2 # Apache-2.0
PyYAML>=3.12 # MIT
requests>=2.18.4 # Apache-2.0
WebOb>=1.7.4 # MIT

View File

@ -6,6 +6,7 @@ description-file =
author = OpenStack
author-email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/vitrage/latest/
python-requires = >=3.6
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
@ -13,15 +14,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 :: System :: Monitoring
[global]
setup-hooks =
pbr.hooks.setup_hook
[entry_points]
console_scripts =
vitrage-api = vitrage.cli.api:main
@ -55,12 +54,3 @@ vitrage.storage =
[files]
packages =
vitrage
[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)

13
tox.ini
View File

@ -7,12 +7,13 @@ ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
install_command = pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} {opts} {packages}
whitelist_externals = find
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands =
stestr run --serial {posargs}
stestr slowest
@ -45,8 +46,8 @@ commands =
[testenv:docs]
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:debug]
@ -86,7 +87,7 @@ paths = ./vitrage/hacking
[testenv:releasenotes]
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html