From f294fa93c24fd0ae64bc431a04c2385690b59084 Mon Sep 17 00:00:00 2001 From: Ivan Kolodyazhny Date: Fri, 10 Jan 2020 00:14:46 +0200 Subject: [PATCH] Use python 2.7 as the default interpreter in tox Infra uses Python 3.5 of tox jobs. The pep8 job and py27djNNN jobs are now run with python3.5 while they are expected to run with python2.7 as of the release. The pep8 job fails on Python2-specific code in the openstack_dashboard/dashboards/admin/images/views.py module with 'long' type cast. This patch enforces us to use Python 2.7 for pep8 job. This probably could be fixed in the infra side but as a short term solution we can cope with this situation in the horizon repo side. Co-Authored-By: Akihiro Motoki Change-Id: I25b0b00eb3d575f8a8c1705f987cfcc0336eccfb --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index dded8b84e9..cbf43d0f07 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,7 @@ minversion = 2.3.2 skipsdist = True [testenv] +basepython = python2.7 install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike} {opts} {packages} setenv = VIRTUAL_ENV={envdir} @@ -26,6 +27,7 @@ commands = venv: {posargs} [testenv:py35] +basepython = python3.5 setenv = PYTHONUNBUFFERED = 1 {[testenv]setenv}