tox on buildout

Issue #142 on hold
faassen created an issue

I've tried using tox from within a buildout. I can easily get tox installed, and then have a 'bin/tox' available in my buildout. When I run it however I get errors like this:

Already using interpreter /usr/bin/python2.7
New python executable in py27/bin/python2.7
Also creating executable in py27/bin/python
Installing setuptools, pip...
  Complete output from command /home/faassen/projec...x/py27/bin/python2.7 -c "import sys, pip; pip...ll\"] + sys.argv[1:])" setuptools pip:
  Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/faassen/.buildout/eggs/virtualenv-1.11-py2.7.egg/virtualenv_support/pip-1.5-py2.py3-none-any.whl/pip/__init__.py", line 9, in <module>
  File "/home/faassen/.buildout/eggs/virtualenv-1.11-py2.7.egg/virtualenv_support/pip-1.5-py2.py3-none-any.whl/pip/log.py", line 8, in <module>
  File "/home/faassen/.buildout/eggs/virtualenv-1.11-py2.7.egg/virtualenv_support/setuptools-2.0.2-py2.py3-none-any.whl/pkg_resources.py", line 2696, in <module>
  File "/home/faassen/.buildout/eggs/virtualenv-1.11-py2.7.egg/virtualenv_support/setuptools-2.0.2-py2.py3-none-any.whl/pkg_resources.py", line 429, in __init__
  File "/home/faassen/.buildout/eggs/virtualenv-1.11-py2.7.egg/virtualenv_support/setuptools-2.0.2-py2.py3-none-any.whl/pkg_resources.py", line 443, in add_entry
  File "/home/faassen/.buildout/eggs/virtualenv-1.11-py2.7.egg/virtualenv_support/setuptools-2.0.2-py2.py3-none-any.whl/pkg_resources.py", line 1722, in find_in_zip
  File "/home/faassen/.buildout/eggs/virtualenv-1.11-py2.7.egg/virtualenv_support/setuptools-2.0.2-py2.py3-none-any.whl/pkg_resources.py", line 1298, in has_metadata
  File "/home/faassen/.buildout/eggs/virtualenv-1.11-py2.7.egg/virtualenv_support/setuptools-2.0.2-py2.py3-none-any.whl/pkg_resources.py", line 1614, in _has
  File "/home/faassen/.buildout/eggs/virtualenv-1.11-py2.7.egg/virtualenv_support/setuptools-2.0.2-py2.py3-none-any.whl/pkg_resources.py", line 1488, in _zipinfo_name
AssertionError: /home/faassen/.buildout/eggs/virtualenv-1.11-py2.7.egg/EGG-INFO/PKG-INFO is not a subpath of /home/faassen/.buildout/eggs/virtualenv-1.11-py2.7.egg/virtualenv_support/setuptools-2.0.2-py2.py3-none-any.whl/

When I run with a tox I installed in a virtualenv, it does work. after that if I run bin/tox again, it works, even if I remove .tox before. Somehow the virtualenv tox invocation magically fixes things. Just the installation of tox in a virtualenv by itself won't do the trick though - only invocation of that tox does the magic fix.

How I install the buildout:

$ virtualenv ve
$ ve/bin/python bootstrap.py
$ bin/buildout

then to run the failing tox:

$ bin/tox

You can find the minimal buildout to test this here:

https://github.com/faassen/buildouttox

Comments (3)

  1. Log in to comment