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 - Use newer openstackdocstheme and reno version - Update hacking version to 3.0 - move python3 setting into toxenv, remove install_command and move constraints into deps Change-Id: Ibb42f8199eb4ca93e438e5e7ef5d4c4e0b35a738
This commit is contained in:
parent
04f507a64b
commit
54f2eb0904
@ -2,9 +2,8 @@
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
openstackdocstheme>=1.20.0 # Apache-2.0
|
||||
reno>=0.1.1 # Apache2
|
||||
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.31.2 # Apache-2.0
|
||||
reno>=2.5.0 # Apache2
|
||||
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD
|
||||
sphinxcontrib-httpdomain
|
||||
sphinxcontrib-pecanwsme>=0.8
|
||||
sphinxcontrib-pecanwsme>=0.10.0
|
||||
|
@ -26,7 +26,7 @@ Glossary
|
||||
API server
|
||||
HTTP REST API service for Aodh.
|
||||
|
||||
http callback
|
||||
HTTP callback
|
||||
HTTP callback is used for calling a predefined URL, whenever an
|
||||
alarm has been set off. The payload of the request contains
|
||||
all the details of why the alarm was triggered.
|
||||
|
@ -7,6 +7,7 @@ description-file =
|
||||
author = OpenStack
|
||||
author-email = openstack-discuss@lists.openstack.org
|
||||
home-page = https://docs.openstack.org/aodh/latest/
|
||||
python-requires = >=3.6
|
||||
classifier =
|
||||
Environment :: OpenStack
|
||||
Intended Audience :: Information Technology
|
||||
@ -14,15 +15,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
|
||||
|
||||
[files]
|
||||
packages =
|
||||
aodh
|
||||
|
9
setup.py
9
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)
|
||||
|
38
tox.ini
38
tox.ini
@ -1,12 +1,12 @@
|
||||
[tox]
|
||||
minversion = 1.6
|
||||
minversion = 3.1.1
|
||||
skipsdist = True
|
||||
envlist = py{37}{,-mysql,-postgresql},functional,pep8
|
||||
ignore_basepython_conflict = True
|
||||
|
||||
[testenv]
|
||||
# NOTE(tonyb): This project has chosen to *NOT* consume upper-constraints.txt
|
||||
basepython = python3
|
||||
usedevelop = True
|
||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
|
||||
setenv =
|
||||
AODH_TEST_DRIVERS=postgresql mysql
|
||||
mysql: AODH_TEST_DRIVERS=mysql
|
||||
@ -15,7 +15,9 @@ setenv =
|
||||
AODH_TEST_DEPS=postgresql,mysql
|
||||
mysql: AODH_TEST_DEPS=mysql
|
||||
postgresql: AODH_TEST_DEPS=postgresql
|
||||
deps = .[test,{env:AODH_TEST_DEPS}]
|
||||
deps =
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
.[test,{env:AODH_TEST_DEPS}]
|
||||
passenv = OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE AODH_TEST_DRIVERS
|
||||
commands =
|
||||
{toxinidir}/run-tests.sh {posargs}
|
||||
@ -24,32 +26,27 @@ commands =
|
||||
whitelist_externals = bash
|
||||
|
||||
[testenv:cover]
|
||||
basepython = python3
|
||||
commands =
|
||||
pifpaf -g AODH_TEST_STORAGE_URL run mysql -- python setup.py testr --slowest --coverage --testr-args="{posargs}"
|
||||
coverage report
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
deps = hacking>=0.12,<0.13
|
||||
deps = hacking>=3.0,<3.1.0
|
||||
commands =
|
||||
flake8
|
||||
# Check that .po and .pot files are valid:
|
||||
bash -c "find aodh -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
|
||||
|
||||
[testenv:releasenotes]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
deps = {[testenv:docs]deps}
|
||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
deps =
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-r{toxinidir}/doc/requirements.txt
|
||||
commands = sphinx-build -W -b html doc/source doc/build/html
|
||||
setenv = PYTHONHASHSEED=0
|
||||
|
||||
[testenv:pdf-docs]
|
||||
basepython = python3
|
||||
deps = {[testenv:docs]deps}
|
||||
whitelist_externals =
|
||||
make
|
||||
@ -58,24 +55,23 @@ commands =
|
||||
make -C doc/build/pdf
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
commands = {posargs}
|
||||
setenv = PYTHONHASHSEED=0
|
||||
|
||||
[testenv:debug]
|
||||
basepython = python3
|
||||
commands = bash -x oslo_debug_helper {posargs}
|
||||
|
||||
[testenv:debug-mysql]
|
||||
basepython = python3
|
||||
deps = .[mysql,test]
|
||||
deps =
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
.[mysql,test]
|
||||
setenv = OS_TEST_PATH=aodh/tests/functional/
|
||||
commands = pifpaf -g AODH_TEST_STORAGE_URL run mysql -- oslo_debug_helper {posargs}
|
||||
|
||||
[testenv:debug-pgsql]
|
||||
basepython = python3
|
||||
deps = .[postgresql,test]
|
||||
deps =
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
.[postgresql,test]
|
||||
setenv = OS_TEST_PATH=aodh/tests/functional/
|
||||
commands = pifpaf -g AODH_TEST_STORAGE_URL run postgresql -- oslo_debug_helper {posargs}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user