1
0

tox.ini 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. commands = sphinx-build docs "{toxinidir}/docs/_build/html" --color -W -bhtml {posargs}
  27. sphinx-build -b doctest docs "{toxinidir}/docs/_build/html"
  28. python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'
  29. [testenv:build]
  30. description = build the package.
  31. skip_install = true
  32. # install_command = pip install --upgrade build
  33. commands = python setup.py bdist_wheel sdist
  34. [testenv:release]
  35. description = build and release the package.
  36. skip_install = true
  37. deps =
  38. twine
  39. # install_command = pip install --upgrade build
  40. commands = python setup.py bdist_wheel sdist
  41. twine upload dist/*
  42. [testenv:release-test]
  43. description = build and release the package.
  44. skip_install = true
  45. deps =
  46. twine
  47. # install_command = pip install --upgrade build
  48. commands = python setup.py bdist_wheel sdist
  49. twine upload -r testpypi dist/*