I'm trying to get Tox and Conda to play together well. Mainly because I have a lot of non-python dependencies that need to be installed and it was easy to create Conda distributions. Then I can install everything with a simple conda install
.
However, I'm having trouble with activating the conda environment.
[tox]
envlist = py27
[testenv]
whitelist_externals =
conda
source
py.test
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/damlarces
install_command =
python build_env.py --conda-env {toxworkdir}/conda {packages}
commands =
source activate {toxworkdir}/conda
py.test --basetemp={envtmpdir}
The python build_env.py --conda-env {toxworkdir}/conda {packages}
takes care of creating the environment (if needed), installing the packages, etc. The problem comes at the source activate {toxworkdir}/conda
line. I get an ERROR: InvocationError: could not find executable 'source'
error. Typing the command directly into the command-line works fine.
For those who are interested. The build_env.py
is in this Gist: https://gist.github.com/JudoWill/70450979353fa2d12823 ... Currently its just installing Python dependencies but in its intended environment it will be installing Conda repo's that are not necessarily python libraries.
Any thoughts?