I have a build box which supports python 2.4, 2.6 and 2.7. This leads to installing various versions of pips as required in their own python installations. I'm using tox to run tests through setup.py.
Whenever I run a {python2.7_installation_dir}/bin/python setup.py test, this results in a .tox directory. Inside .tox directory I run
py27/bin/pip --version pip 1.4.1 from {my_package}/.tox/py27/lib/python2.7/site-packages (python 2.7) [buildbot@BUILD-SERV-01 .tox]# python2.7 Python 2.7.6 (default, Nov 20 2013, 15:33:09) [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pip >>> pip.__version__ '1.5.2' So the version of pip inside .tox directory is 1.4.1 where as pip installed for python interpreter that I'm using to execute the setup.py test is 1.5.2. This leads to errors when running tests as it uses pip to install the directories and some of them come from external sources and in 1.5.2 we need to set explicitly --allow-external --allow-unverified flag for one of the module which doesn't exist in 1.4.1, which results in an error each time i invoke tests through tox.
There is only one python2.7 installation and it is installed from source. But I think it was running pip 1.4.1, but now been upgraded to use 1.5.2. How tox can use the old version? Is there any .pth file or something that could have been left behind which needs clearing up?
I could drop tox and run pytests directly but I'd prefer to run them via tox.
Please let me know if you want to see the logs, I can update the question with the log.