New issue 334: tox always uses python 2.7 to build envs. can't work on projects with python3 code in setup.py https://bitbucket.org/hpk42/tox/issues/334/tox-always-uses-python-27-to-build-envs
cpdean: I've added the following to my setup.py: ``` import sys with open("what.version.is.this.txt", "w") as f: f.write(str(sys.version_info) + "\n") ``` my tox file looks like this: ``` [tox] basepython=python3 envlist = py35 [testenv] basepython=python3 deps = [testenv:py35] basepython=python3 skip_install = true skipsdist = true deps = mypy-lang commands = mypy --py2 zulip ``` and the following gets written out: ``` $ cat what.version.is.this.txt sys.version_info(major=2, minor=7, micro=10, releaselevel='final', serial=0) ``` This is a problem because the project I'm trying to add tox to uses a module found only in python3. ``` tox GLOB sdist-make: /Users/cdean/dev/foss/python/zulip/api/setup.py ERROR: invocation failed (exit code 1), logfile: /Users/cdean/dev/foss/python/zulip/api/.tox/log/tox-0.log ERROR: actionid: tox msg: packaging cmdargs: ['/usr/local/opt/python/bin/python2.7', local('/Users/cdean/dev/foss/python/zulip/api/setup.py'), 'sdist', '--formats=zip', '--dist-dir', local('/Users/cdean/dev/foss/python/zulip/api/.tox/dist')] env: None Traceback (most recent call last): File "setup.py", line 9, in <module> from typing import Any, Generator, List, Tuple ImportError: No module named typing ERROR: FAIL could not package project - v = InvocationError('/usr/local/opt/python/bin/python2.7 /Users/cdean/dev/foss/python/zulip/api/setup.py sdist --formats=zip --dist-dir /Users/cdean/dev/foss/python/zulip/api/.tox/dist (see /Users/cdean/dev/foss/python/zulip/api/.tox/log/tox-0.log)', 1) ``` What am I doing wrong here? _______________________________________________ pytest-commit mailing list pytest-commit@python.org https://mail.python.org/mailman/listinfo/pytest-commit