[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2876: tox won't run on ubuntu xenial: python3
Tahoe-LAFS
trac at tahoe-lafs.org
Mon Jun 5 10:42:10 UTC 2017
#2876: tox won't run on ubuntu xenial: python3
-----------------------+------------------------
Reporter: warner | Owner: daira
Type: defect | Status: new
Priority: major | Milestone: 1.13.0
Component: packaging | Version: 1.12.1
Keywords: | Launchpad Bug:
-----------------------+------------------------
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?
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2876>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list