The Python package installer https://pip.pypa.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

82 lines
2.8 KiB

  1. [tox]
  2. minversion = 3.4.0
  3. envlist =
  4. docs, packaging, lint, vendoring,
  5. py27, py35, py36, py37, py38, py39, pypy, pypy3
  6. [helpers]
  7. # Wrapper for calls to pip that make sure the version being used is the
  8. # original virtualenv (stable) version, and not the code being tested.
  9. pip = python {toxinidir}/tools/tox_pip.py
  10. mkdirp = python -c 'import os, sys; os.path.exists(sys.argv[1]) or os.mkdir(sys.argv[1])'
  11. [testenv]
  12. # Remove USERNAME once we drop PY2.
  13. passenv =
  14. CI
  15. GIT_SSL_CAINFO
  16. USERNAME
  17. HTTP_PROXY
  18. HTTPS_PROXY
  19. NO_PROXY
  20. setenv =
  21. # This is required in order to get UTF-8 output inside of the subprocesses
  22. # that our tests use.
  23. LC_CTYPE = en_US.UTF-8
  24. deps = -r{toxinidir}/tools/requirements/tests.txt
  25. commands_pre =
  26. python -c 'import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)' {toxinidir}/tests/data/common_wheels
  27. {[helpers]pip} wheel -w {toxinidir}/tests/data/common_wheels -r {toxinidir}/tools/requirements/tests-common_wheels.txt
  28. commands = pytest --timeout 300 []
  29. install_command = {[helpers]pip} install {opts} {packages}
  30. list_dependencies_command = {[helpers]pip} freeze --all
  31. [testenv:coverage]
  32. basepython = python3
  33. commands =
  34. {[helpers]mkdirp} {toxinidir}/.coverage-output
  35. pytest --timeout 300 --cov=pip --cov-config={toxinidir}/setup.cfg []
  36. setenv =
  37. # Used in coverage configuration in setup.cfg.
  38. COVERAGE_OUTPUT_DIR = {toxinidir}/.coverage-output
  39. # Ensure coverage is enabled in child processes in virtual environments
  40. # since they won't already have been enabled by pytest-cov.
  41. COVERAGE_PROCESS_START = {toxinidir}/setup.cfg
  42. # Used in coverage configuration in setup.cfg.
  43. PIP_CI_COVERAGE_EXCLUDES = if PY2
  44. [testenv:docs]
  45. # Don't skip install here since pip_sphinxext uses pip's internals.
  46. deps = -r{toxinidir}/tools/requirements/docs.txt
  47. basepython = python3
  48. commands =
  49. sphinx-build -W -d {envtmpdir}/doctrees/html -b html docs/html docs/build/html
  50. # Having the conf.py in the docs/html is weird but needed because we
  51. # can not use a different configuration directory vs source directory on RTD
  52. # currently -- https://github.com/rtfd/readthedocs.org/issues/1543.
  53. # That is why we have a "-c docs/html" in the next line.
  54. sphinx-build -W -d {envtmpdir}/doctrees/man -b man docs/man docs/build/man -c docs/html
  55. [testenv:lint]
  56. skip_install = True
  57. commands_pre =
  58. deps = pre-commit
  59. commands =
  60. pre-commit run [] --all-files --show-diff-on-failure
  61. [testenv:vendoring]
  62. basepython = python3
  63. skip_install = True
  64. commands_pre =
  65. deps =
  66. vendoring~=0.3.3
  67. # Required, otherwise we interpret --no-binary :all: as
  68. # "do not build wheels", which fails for PEP 517 requirements
  69. pip>=19.3.1
  70. whitelist_externals = git
  71. commands =
  72. # Check that the vendoring is up-to-date
  73. vendoring sync . -v
  74. git diff --exit-code