Resolve some issue with tox.ini, setup.cfg

- Use constraints for documentation targets
- Indicate support for Python 3.7

Change-Id: I5f068d199e70cb7c2f0f71972bb0f81e025795fe
Signed-off-by: Stephen Finucane <sfinucan@sfinucan.users.ipa.redhat.com>
This commit is contained in:
Stephen Finucane 2019-05-21 09:40:02 +01:00
parent 40007e84db
commit 99dc6e0198
2 changed files with 22 additions and 33 deletions

View File

@ -17,6 +17,7 @@ classifier =
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
[files]
packages =
@ -40,5 +41,5 @@ keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = oslo_versionedobjects/locale/oslo_versionedobjects.pot
[wheel]
[bdist_wheel]
universal = true

52
tox.ini
View File

@ -1,45 +1,45 @@
[tox]
minversion = 2.0
envlist = py36,py27,pep8
minversion = 3.1
envlist = py27,py36,py37,pep8
basepython = python3
ignore_basepython_conflict = true
[testenv]
setenv =
VIRTUAL_ENV={envdir}
BRANCH_NAME=master
install_command = pip install {opts} {packages}
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}/test-requirements.txt
commands = stestr run --slowest {posargs}
[testenv:py27]
basepython = python2.7
[testenv:pep8]
basepython = python3
deps =
-r{toxinidir}/test-requirements.txt
commands =
flake8
# Run security linter
bandit -r oslo_versionedobjects tests -n5 --skip B303
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
commands = python setup.py test --coverage --coverage-package-name=oslo_versionedobjects --testr-args='{posargs}'
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:cover]
basepython = python3
commands = python setup.py test --coverage --coverage-package-name=oslo_versionedobjects --testr-args='{posargs}'
[testenv:releasenotes]
deps = {[testenv:docs]deps}
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:lower-constraints]
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125
builtins = _
@ -47,15 +47,3 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[hacking]
import_exceptions = oslo_versionedobjects._i18n
[testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt