Skip to content
Snippets Groups Projects
Commit 85c37f34 authored by Corné Lukken's avatar Corné Lukken
Browse files

L2SS-951: Update tox.ini documentation

parent 1f7b292c
No related branches found
No related tags found
1 merge request!423L2SS-951: Disable site-packages and install pytango in tox
...@@ -5,21 +5,15 @@ skipsdist = True ...@@ -5,21 +5,15 @@ skipsdist = True
[testenv] [testenv]
usedevelop = True usedevelop = True
; Module access is a bit of an ugly hack. This is due to testenv inheritance ; Python and tox variables are used to access modules and binaries instead of
; with sitepackages = True`, meaning that global packages can be accessed by the ; directly. This is an artifact of having used sitepackages = true in the past.
; tox environment. Our tango images already have several dependencies system
; wide installed, however, the system wide installation will never look inside
; tox its virtualenv for packages. So accessing stestr and others fail.. We
; can't remove `sitepackages = True` either as we need access to tango and
; installing this package is non-trivial. The solution is to prevent calling
; binaries directly and utilizing python and tox variables to resolve the
; requested module.
; sitepackages = True
install_command = {envbindir}/pip3 install {opts} {packages} install_command = {envbindir}/pip3 install {opts} {packages}
passenv = HOME passenv = HOME
setenv = setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning PYTHONWARNINGS=default::DeprecationWarning
; Share the same envdir with as many jobs as possible due to extensive time it
; takes to compile the pytango wheel, in addition to its large install size.
envdir = {toxworkdir}/testenv envdir = {toxworkdir}/testenv
deps = deps =
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
...@@ -32,6 +26,8 @@ commands = ...@@ -32,6 +26,8 @@ commands =
{envpython} -m stestr --version {envpython} -m stestr --version
{envpython} -m stestr run {posargs} {envpython} -m stestr run {posargs}
; We can't detect the current Python version for an environment dynamically
; so each Python version specific job needs its own envdir.
[testenv:py37] [testenv:py37]
envdir = {toxworkdir}/testenvpy37 envdir = {toxworkdir}/testenvpy37
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment