Can not install sure dependency in tox.

Issue #245 on hold
gregbestland created an issue

When I specify sure as a dependency in my tox file it will error out during install. This only appears to a problem with python 3.3 and 3.4. The only reason I think this is an issue with tox is that it started happening today, and I noticed you a pushed a new version of tox to pypi, which correlates with the breakage.

Here is the exact issue I'm seeing..

py33 installdeps: nose, mock, unittest2, PyYAML, six, sure, blist
ERROR: invocation failed (exit code 1), logfile: /Users/gregbestland/git/python-driver/.tox/py33/log/py33-1.log
ERROR: actionid: py33
msg: getenv
cmdargs: [local('/Users/gregbestland/git/python-driver/.tox/py33/bin/pip'), 'install', 'nose', 'mock', 'unittest2', 'PyYAML', 'six', 'sure', 'blist']
env: {'PATH': '/Users/gregbestland/git/python-driver/.tox/py33/bin:/Users/gregbestland/.pyenv/shims:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/gregbestland/git/automaton/bin', 'VIRTUAL_ENV': '/Users/gregbestland/git/python-driver/.tox/py33', 'PYTHONHASHSEED': '1606799025', 'USE_CASS_EXTERNAL': '1'}

Collecting nose
  Using cached nose-1.3.6-py3-none-any.whl
Collecting mock
  Using cached mock-1.0.1.tar.gz
Collecting unittest2
  Using cached unittest2-1.0.1-py2.py3-none-any.whl
Collecting PyYAML
  Using cached PyYAML-3.11.tar.gz
Collecting six
  Using cached six-1.9.0-py2.py3-none-any.whl
Collecting sure
  Using cached sure-1.2.12.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/tmp/pip-build-zwg5pd/sure/setup.py", line 54, in <module>
        version=read_version(),
      File "/private/tmp/pip-build-zwg5pd/sure/setup.py", line 40, in read_version
        finder.visit(ast.parse(local_file('sure', '__init__.py')))
      File "/private/tmp/pip-build-zwg5pd/sure/setup.py", line 45, in <lambda>
        open(os.path.join(os.path.dirname(__file__), *f)).read()
      File "/Users/gregbestland/git/python-driver/.tox/py33/lib/python3.3/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 143: ordinal not in range(128)

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-zwg5pd/sure

ERROR: could not install deps [nose, mock, unittest2, PyYAML, six, sure, blist]; v = InvocationError('/Users/gregbestland/git/python-driver/.tox/py33/bin/pip install nose mock unittest2 PyYAML six sure blist (see /Users/gregbestland/git/python-driver/.tox/py33/log/py33-1.log)', 1)
___________________________________ summary ____________________________________
ERROR:   py33: could not install deps [nose, mock, unittest2, PyYAML, six, sure, blist]; v = InvocationError('/Users/gregbestland/git/python-driver/.tox/py33/bin/pip install nose mock unittest2 PyYAML six sure blist (see /Users/gregbestland/git/python-driver/.tox/py33/log/py33-1.log)', 1)

If I specify a much much older version of sure for instance 1.2.3 it will work. Anything>1.2.3 and the install run through tox fails. The newer versions were working great yesterday. I of course attempted to manually install the packages with pip and they installed with no issues, this only seems to happen with tox.

I'm currently working around it by specifying an older version of sure, but I'm guessing this might affect other packages installed by tox maybe?

Comments (9)

  1. Peter Bittner

    I have a similar problem, maybe with the same root cause: The symptom I see in my build too is the msg: getenv error message.

    I'm trying to allow running tests in my project without the need of installing development requirements. Everything should be managed by tox. I try to achieve this via integration in setup.py as suggested in the tox documentation.

    Unfortunately, tox does require at least virtualenv as a prerequisite. Otherwise the above error occurs. (Note: It's also fine to install tox to make python setup.py test work, but installing just virtualenv as the only dependency is sufficient.)

    If installing virtualenv were not necessary I could omit the install: block in my Travis CI build configuration. Same is true for local execution of tox. That's why I need to have a note on tox prerequisites in my project README ("you'll have to install virtualenv though").

    Is this a bug?

  2. Log in to comment