﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	launchpad_bug
2876	tox won't run on ubuntu xenial: python3	warner	daira	"We recently landed a change to our `setup.py`, to bail with a clear error message if you try to run it under python3 (since tahoe only supports python2). Unfortunately, the `tox` provided in Ubuntu-16.04 ""xenial"" (the most recent LTS release) is a python3 executable, and when it runs `setup.py` to build a .zip package, it fails:

{{{
$ tox -e py27
GLOB sdist-make: /home/bb-tahoe/bb-tahoe/Ubuntu_xenial_16_04/build/setup.py
ERROR: invocation failed (exit code 1), logfile: /home/bb-tahoe/bb-tahoe/Ubuntu_xenial_16_04/build/.tox/log/tox-0.log
ERROR: actionid: tox
msg: packaging
cmdargs: ['/usr/bin/python3', local('/home/bb-tahoe/bb-tahoe/Ubuntu_xenial_16_04/build/setup.py'), 'sdist', '--formats=zip', '--dist-dir', local('/home/bb-tahoe/bb-tahoe/Ubuntu_xenial_16_04/build/.tox/dist')]
env: None

Traceback (most recent call last):
  File ""setup.py"", line 32, in <module>
    raise RuntimeError(""Python version 2 is required"")
RuntimeError: Python version 2 is required

ERROR: FAIL could not package project - v = InvocationError('/usr/bin/python3 /home/bb-tahoe/bb-tahoe/Ubuntu_xenial_16_04/build/setup.py sdist --formats=zip --dist-dir /home/bb-tahoe/bb-tahoe/Ubuntu_xenial_16_04/build/.tox/dist (see /home/bb-tahoe/bb-tahoe/Ubuntu_xenial_16_04/build/.tox/log/tox-0.log)', 1)
}}}

As a result, our xenial buildbot is failing, and folks using xenial can't test tahoe.

I'm a bit surprised that tox is using it's native python3 to build a package, even though the `-e py27` should cause it to use python2 to actually run the tests. Is there some way to tell tox which python to use for packaging purposes?
"	defect	closed	major	1.13.0	packaging	1.12.1	fixed			
