From 3d85f75200de13f628b746bf27834f70c4c1a146 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Thu, 25 Nov 2021 14:56:57 +0000 Subject: [PATCH] Workaround for tox w/o setup.py bug Related: https://github.com/tox-dev/tox/issues/2197 --- tox.ini | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/tox.ini b/tox.ini index 5ced7dbd19..3c0012a728 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,10 @@ requires = pip >= 20.2.4 [testenv] -usedevelop = True +# both options needed to workaround https://github.com/tox-dev/tox/issues/2197 +usedevelop = False +skip_install = True + # do not put * in passenv as it may break builds do to reduced isolation passenv = CI @@ -45,6 +48,7 @@ setenv = PYTHONUNBUFFERED=1 _EXTRAS=-l --cov=molecule --no-cov-on-fail --cov-report xml:{envlogdir}/coverage.xml --html={envlogdir}/reports.html --self-contained-html deps = + --editable .[docker,lint,podman,test,windows] devel: git+https://github.com/ansible/ansible#egg=ansible-core # pytest-molecule not used but we want to check that it does not conflict devel: git+https://github.com/ansible-community/pytest-molecule#egg=pytest-molecule @@ -52,12 +56,6 @@ deps = selinux py{36,37}: importlib-metadata>=0.12 py: ansible-core -extras = - docker - lint - podman - test - windows ; commands_pre = ; find {toxinidir} -type f -not -path '{toxinidir}/.tox/*' -path '*/__pycache__/*' -name '*.py[c|o]' -delete ; sh -c 'find {homedir}/.cache -type d -path "*/molecule_*" -exec rm -rfv \{\} +;' @@ -123,8 +121,8 @@ commands = python -c \ 'import pathlib; '\ 'docs_dir = pathlib.Path(r"{toxinidir}") / "docs/docstree/html"; index_file = docs_dir / "index.html"; print(f"\nDocumentation available under `file://\{index_file\}`\n\nTo serve docs, use `python3 -m http.server --directory \{docs_dir\} 0`\n")' -extras = - docs +deps = + --editable .[docs] [testenv:docs-livereload] description = Invoke sphinx-autobuild to build and reload the HTML docs @@ -134,15 +132,16 @@ usedevelop = {[testenv:docs]usedevelop} commands = python -m sphinx_autobuild docs/ "{toxworkdir}/docs/html" deps = + --editable .[docs] sphinx-autobuild>=0.7.1,<1.0 -extras = - docs [testenv:dockerfile] description = Tests validity of embedded Dockerfile template used by docker driver commands = ansible-playbook src/molecule/data/validate-dockerfile.yml -extras = +deps = + ansible-core + paramiko docker selinux