Using TOX on CentOS 6.6 with Software Collections
I have CentOS 6.6 running with a hand full of software collections.
I stumbled upon TOX, which is a neat little tool to test your python / django projects in a nice and efficient way. (django-webtests depend on that as well, which is why I installed it in the first place).
With CentOS 6.6, you will only have python version 2.6 installed on your machine. Using software collections to use python3.3 (used in this example) eventually will let you run into the issue that he can’t find the shared library for python 3 when running tox.
Just throwing together a little tox.ini file and installing tox through pip.
[tox]
envlist = py33
skipsdist = True
[testenv]
commands =
/path/to/project/.tox/python3.3 manage.py test
deps = -rpip-requirements.txt
setenv =
LD_LIBRARY_PATH=/opt/rh/python33/root/usr/lib64
I have tried quite a lot of things, from trying to run the enable script in:
over setting PYTHONPATH to enable the software collection permanently on my machine.
The solution in the end was not to configure anything but just to set LD_LIBRARY_PATH.
You can get the environment path via the following command:
env | grep LD_LIBRARY_PATH
Kudos to the RedHat Enterprise Support Forum as I have found a hint about this over there, in reference to a different problem.
http://bugzilla.redhat.com/show_bug.cgi?id=1198691
Sometimes you just need to be lucky.
Hope this guide is helpful for anyone out there and stay tuned for more articles in the near future!