tox.ini 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. [tox]
  2. envlist = py36,py38,py310
  3. # isolated_build = True
  4. # requires = [-rrequirements.txt]
  5. [testenv]
  6. deps =
  7. -rrequirements.txt
  8. pytest
  9. # change pytest tempdir and add posargs from command line
  10. commands = pytest --pyargs redmail -r chars
  11. [testenv:wheeltest]
  12. description = Build and install the wheel and run Pytests in it.
  13. deps =
  14. pytest
  15. skip_install = True
  16. commands =
  17. # /bin/rm -rf build
  18. python setup.py bdist_wheel
  19. pip install --upgrade --find-links={toxinidir}/dist redmail
  20. pytest --pyargs redmail -r chars
  21. [testenv:docs]
  22. description = invoke sphinx-build to build the HTML docs
  23. basepython = python3.8
  24. deps =
  25. -r{toxinidir}/requirements/docs.txt
  26. sphinx >= 1.7.5
  27. commands = sphinx-build docs "{toxinidir}/docs/_build/html" --color -W -bhtml {posargs}
  28. sphinx-build -b doctest docs "{toxinidir}/docs/_build/html"
  29. python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'
  30. [testenv:build]
  31. description = build the package.
  32. skip_install = true
  33. # install_command = pip install --upgrade build
  34. commands = python setup.py bdist_wheel sdist
  35. [testenv:release]
  36. description = build and release the package.
  37. skip_install = true
  38. deps =
  39. twine
  40. # install_command = pip install --upgrade build
  41. commands = python setup.py bdist_wheel sdist
  42. twine upload dist/*
  43. [testenv:release-test]
  44. description = build and release the package.
  45. skip_install = true
  46. deps =
  47. twine
  48. # install_command = pip install --upgrade build
  49. commands = python setup.py bdist_wheel sdist
  50. twine upload -r testpypi dist/*