Issues

Issue #96 new

Can't have a Python 3 setup.py

Barry Warsaw
created an issue

Let's say your setup.py is only Python 3 compatible. tox set up fails when building the sdist:

% tox -e py33
GLOB sdist-make: .../setup.py
ERROR: invocation failed, logfile: .../.tox/log/tox-0.log
ERROR: actionid=tox
msg=packaging
cmdargs=['/usr/bin/python', local('.../setup.py'), 'sdist', '--formats=zip', '--dist-dir', local('.../.tox/dist')]
env=None
Traceback (most recent call last):
  File "setup.py", line 18, in <module>
    with open('.../version.txt', encoding='utf-8') as fp:
TypeError: 'encoding' is an invalid keyword argument for this function

ERROR: FAIL could not package project

There doesn't seem to be a way to configure this in the tox.ini, though I could be missing it of course.

Comments (3)

  1. Barry Warsaw reporter

    I didn't because on Debian/Ubuntu, we install /usr/bin/tox with a #! of /usr/bin/python (i.e. Python 2). It would be really nice if we didn't have to also install a /usr/bin/tox3 because that way lies madness (we have a similar problem with nose where we're moving away from having /usr/bin/nosetests{,-3} since we'd also need debugging versions and that just means we have to install way too many scripts).

  2. holger krekel repo owner

    there is a (somewhat vague) plan to make the sdist-packaging configurable, particularly the interpreter choice. This would probably fix this issue.

  3. Log in to comment