Skip to content

Commit

Permalink
Add support for python 3.6
Browse files Browse the repository at this point in the history
- This change increases the maxium
  version of python 3 to 3.6
- This change simplifes the tox.ini
  by deduplicating common sections.
- This change adds py36 to the default
  envlist.
- This change lists python 3 in the
  setuptools classifers.

comes from Sean Mooney at https://github.com/mfcloud/python-zvm-sdk/pull/7

Change-Id: Ied4b9f5eedb0fb8e4a696fc3722b2f571938233e
  • Loading branch information
jichenjc committed Jul 19, 2018
1 parent 23e585c commit 056e286
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7"
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5"
"Programming Language :: Python :: 3.6"
],
entry_points={
'wsgi_scripts': [
Expand Down
20 changes: 5 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
[tox]
minversion = 1.6
envlist = pep8,py27,py35,docs
envlist = pep8,py{27,35,36},docs
skipsdist = True

[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = python -m unittest discover -v -s {toxinidir}/zvmsdk/tests/unit
python -m unittest discover -v -s {toxinidir}/smutLayer/tests/unit

[testenv:pep8]
deps = flake8
Expand All @@ -18,22 +22,8 @@ commands = flake8
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,sample,*lib/python*,*egg,build,tools,*.py.*.py

[testenv:py27]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = python -m unittest discover -v -s {toxinidir}/zvmsdk/tests/unit
python -m unittest discover -v -s {toxinidir}/smutLayer/tests/unit

[testenv:py35]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = python -m unittest discover -v -s {toxinidir}/zvmsdk/tests/unit
python -m unittest discover -v -s {toxinidir}/smutLayer/tests/unit

[testenv:docs]
whitelist_externals = rm
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
rm -rf doc/build
python tools/generate_conf.py
Expand Down
4 changes: 2 additions & 2 deletions zvmsdk/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
_PYTHON_N = sys.version_info[1]
if _PYTHON_M == 2 and _PYTHON_N < 7:
raise RuntimeError('On Python 2, zvm sdk requires Python 2.7')
elif _PYTHON_M == 3 and _PYTHON_N > 5:
raise RuntimeError('On Python 3, zvm sdk supports to Python 3.5')
elif _PYTHON_M == 3 and _PYTHON_N > 6:
raise RuntimeError('On Python 3, zvm sdk supports to Python 3.6')

0 comments on commit 056e286

Please sign in to comment.