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 <amotoki@gmail.com>
Change-Id: I25b0b00eb3d575f8a8c1705f987cfcc0336eccfb
This commit is contained in:
Ivan Kolodyazhny 2020-01-10 00:14:46 +02:00 committed by Akihiro Motoki
parent 2987358035
commit f294fa93c2
1 changed files with 2 additions and 0 deletions

View File

@ -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}