Skip to content

Commit

Permalink
Add support for tox to test across python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
bozzzzo committed Mar 24, 2020
1 parent bbbb35c commit 040d801
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ wheels/
.installed.cfg
*.egg
MANIFEST
.tox/
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[build-system]
# These are the assumed default build requirements from pip:
# https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support
requires = ["setuptools>=40.8.0", "wheel"]
build-backend = "setuptools.build_meta"
7 changes: 7 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@
},
extras_require={
'dev': [
'flake8',
'pytest',
'tox',
'wheel',
'setuptools',
],
'test': [
'coverage',
],
},
)
27 changes: 27 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[tox]
envlist = py{35,36,37}
skip_missing_interpreters = True

# Define the minimal tox version required to run;
# if the host tox is less than this the tool with create an environment and
# provision it with a tox that satisfies it under provision_tox_env.
# At least this version is needed for PEP 517/518 support.
minversion = 3.3.0

# Activate isolated build environment. tox will use a virtual environment
# to build a source distribution from the source tree. For build tools and
# arguments use the pyproject.toml file as specified in PEP-517 and PEP-518.
isolated_build = true

[testenv]
deps =
flake8
pytest
commands =
python setup.py check -m -s
# flake8 .
py.test tests {posargs}

[flake8]
exclude = .tox,*.egg,build,data
select = E,W,F

0 comments on commit 040d801

Please sign in to comment.