# this file is *not* meant to cover or endorse the use of tox or pytest or
# testing in general,
#
#  It's meant to show the use of:
#
#  - check-manifest
#     confirm items checked into vcs are in your sdist
#  - python setup.py check
#     confirm required package meta-data in setup.py
#  - readme_renderer (when using a ReStructuredText README)
#     confirms your long_description will render correctly on PyPI.
#
#  and also to help confirm pull requests to this project.

[tox]
envlist = py{37,38}

# 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.18.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 =
    check-manifest >= 0.42
    # If your project uses README.rst, uncomment the following:
    # readme_renderer
    flake8
    pytest
commands =
    # check-manifest --ignore 'tox.ini,tests/**'
    # This repository uses a Markdown long_description, so the -r flag to
    # `setup.py check` is not needed. If your project contains a README.rst,
    # use `python setup.py check -m -r -s` instead.
    python setup.py check -m -s
    flake8
    py.test {posargs}

[flake8]
exclude = .tox,*.egg,build,data,docs,venv,__init__.py
select = E,W,F
ignore=W503, E402, E501

[check-manifest]
ignore = .pypirc,tox.ini,tests/,docs/,venv/