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
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
|
|
||||||
openstackdocstheme>=1.20.0 # Apache-2.0
|
openstackdocstheme>=1.31.2 # Apache-2.0
|
||||||
reno>=0.1.1 # Apache2
|
reno>=2.5.0 # 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 # BSD
|
||||||
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
|
|
||||||
sphinxcontrib-httpdomain
|
sphinxcontrib-httpdomain
|
||||||
sphinxcontrib-pecanwsme>=0.8
|
sphinxcontrib-pecanwsme>=0.10.0
|
||||||
|
@ -26,7 +26,7 @@ Glossary
|
|||||||
API server
|
API server
|
||||||
HTTP REST API service for Aodh.
|
HTTP REST API service for Aodh.
|
||||||
|
|
||||||
http callback
|
HTTP callback
|
||||||
HTTP callback is used for calling a predefined URL, whenever an
|
HTTP callback is used for calling a predefined URL, whenever an
|
||||||
alarm has been set off. The payload of the request contains
|
alarm has been set off. The payload of the request contains
|
||||||
all the details of why the alarm was triggered.
|
all the details of why the alarm was triggered.
|
||||||
|
@ -7,6 +7,7 @@ description-file =
|
|||||||
author = OpenStack
|
author = OpenStack
|
||||||
author-email = openstack-discuss@lists.openstack.org
|
author-email = openstack-discuss@lists.openstack.org
|
||||||
home-page = https://docs.openstack.org/aodh/latest/
|
home-page = https://docs.openstack.org/aodh/latest/
|
||||||
|
python-requires = >=3.6
|
||||||
classifier =
|
classifier =
|
||||||
Environment :: OpenStack
|
Environment :: OpenStack
|
||||||
Intended Audience :: Information Technology
|
Intended Audience :: Information Technology
|
||||||
@ -14,15 +15,13 @@ classifier =
|
|||||||
License :: OSI Approved :: Apache Software License
|
License :: OSI Approved :: Apache Software License
|
||||||
Operating System :: POSIX :: Linux
|
Operating System :: POSIX :: Linux
|
||||||
Programming Language :: Python
|
Programming Language :: Python
|
||||||
|
Programming Language :: Python :: Implementation :: CPython
|
||||||
|
Programming Language :: Python :: 3 :: Only
|
||||||
Programming Language :: Python :: 3
|
Programming Language :: Python :: 3
|
||||||
Programming Language :: Python :: 3.6
|
Programming Language :: Python :: 3.6
|
||||||
Programming Language :: Python :: 3.7
|
Programming Language :: Python :: 3.7
|
||||||
Topic :: System :: Monitoring
|
Topic :: System :: Monitoring
|
||||||
|
|
||||||
[global]
|
|
||||||
setup-hooks =
|
|
||||||
pbr.hooks.setup_hook
|
|
||||||
|
|
||||||
[files]
|
[files]
|
||||||
packages =
|
packages =
|
||||||
aodh
|
aodh
|
||||||
|
9
setup.py
9
setup.py
@ -13,17 +13,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
|
|
||||||
import setuptools
|
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(
|
setuptools.setup(
|
||||||
setup_requires=['pbr'],
|
setup_requires=['pbr'],
|
||||||
pbr=True)
|
pbr=True)
|
||||||
|
38
tox.ini
38
tox.ini
@ -1,12 +1,12 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 1.6
|
minversion = 3.1.1
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
envlist = py{37}{,-mysql,-postgresql},functional,pep8
|
envlist = py{37}{,-mysql,-postgresql},functional,pep8
|
||||||
|
ignore_basepython_conflict = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
# NOTE(tonyb): This project has chosen to *NOT* consume upper-constraints.txt
|
basepython = python3
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
|
|
||||||
setenv =
|
setenv =
|
||||||
AODH_TEST_DRIVERS=postgresql mysql
|
AODH_TEST_DRIVERS=postgresql mysql
|
||||||
mysql: AODH_TEST_DRIVERS=mysql
|
mysql: AODH_TEST_DRIVERS=mysql
|
||||||
@ -15,7 +15,9 @@ setenv =
|
|||||||
AODH_TEST_DEPS=postgresql,mysql
|
AODH_TEST_DEPS=postgresql,mysql
|
||||||
mysql: AODH_TEST_DEPS=mysql
|
mysql: AODH_TEST_DEPS=mysql
|
||||||
postgresql: AODH_TEST_DEPS=postgresql
|
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
|
passenv = OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE AODH_TEST_DRIVERS
|
||||||
commands =
|
commands =
|
||||||
{toxinidir}/run-tests.sh {posargs}
|
{toxinidir}/run-tests.sh {posargs}
|
||||||
@ -24,32 +26,27 @@ commands =
|
|||||||
whitelist_externals = bash
|
whitelist_externals = bash
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
basepython = python3
|
|
||||||
commands =
|
commands =
|
||||||
pifpaf -g AODH_TEST_STORAGE_URL run mysql -- python setup.py testr --slowest --coverage --testr-args="{posargs}"
|
pifpaf -g AODH_TEST_STORAGE_URL run mysql -- python setup.py testr --slowest --coverage --testr-args="{posargs}"
|
||||||
coverage report
|
coverage report
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
deps = hacking>=3.0,<3.1.0
|
||||||
deps = hacking>=0.12,<0.13
|
|
||||||
commands =
|
commands =
|
||||||
flake8
|
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]
|
[testenv:releasenotes]
|
||||||
basepython = python3
|
deps = {[testenv:docs]deps}
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
|
||||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python3
|
deps =
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
-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
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
||||||
setenv = PYTHONHASHSEED=0
|
setenv = PYTHONHASHSEED=0
|
||||||
|
|
||||||
[testenv:pdf-docs]
|
[testenv:pdf-docs]
|
||||||
basepython = python3
|
|
||||||
deps = {[testenv:docs]deps}
|
deps = {[testenv:docs]deps}
|
||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
make
|
make
|
||||||
@ -58,24 +55,23 @@ commands =
|
|||||||
make -C doc/build/pdf
|
make -C doc/build/pdf
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
basepython = python3
|
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
setenv = PYTHONHASHSEED=0
|
setenv = PYTHONHASHSEED=0
|
||||||
|
|
||||||
[testenv:debug]
|
[testenv:debug]
|
||||||
basepython = python3
|
|
||||||
commands = bash -x oslo_debug_helper {posargs}
|
commands = bash -x oslo_debug_helper {posargs}
|
||||||
|
|
||||||
[testenv:debug-mysql]
|
[testenv:debug-mysql]
|
||||||
basepython = python3
|
deps =
|
||||||
deps = .[mysql,test]
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
|
.[mysql,test]
|
||||||
setenv = OS_TEST_PATH=aodh/tests/functional/
|
setenv = OS_TEST_PATH=aodh/tests/functional/
|
||||||
commands = pifpaf -g AODH_TEST_STORAGE_URL run mysql -- oslo_debug_helper {posargs}
|
commands = pifpaf -g AODH_TEST_STORAGE_URL run mysql -- oslo_debug_helper {posargs}
|
||||||
|
|
||||||
[testenv:debug-pgsql]
|
[testenv:debug-pgsql]
|
||||||
basepython = python3
|
deps =
|
||||||
deps = .[postgresql,test]
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
|
.[postgresql,test]
|
||||||
setenv = OS_TEST_PATH=aodh/tests/functional/
|
setenv = OS_TEST_PATH=aodh/tests/functional/
|
||||||
commands = pifpaf -g AODH_TEST_STORAGE_URL run postgresql -- oslo_debug_helper {posargs}
|
commands = pifpaf -g AODH_TEST_STORAGE_URL run postgresql -- oslo_debug_helper {posargs}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user