From 052ca666cbd68238e5464dc32e03b0bb127fdc8f Mon Sep 17 00:00:00 2001 From: donagh-mccabe Date: Tue, 8 Nov 2016 15:31:33 +0000 Subject: [PATCH] Add python3-dev to bindep and use py27for some envs Installed my workstation with Ubuntu Xenial and then hit a few snags running tox. python3-dev is needed to build the python3 envs. Did not actually test python3-devel (rpm) as I don't have such a system. While python2.7 is the default, tox (on Xenial) itself uses python3.5, hence 3.5 becomes the basepython and a number of envs don't work. Driveby, removed warning about /bin/echo in py3pep8 Change-Id: Ie880246dd757570b8e444da0e643f3c50093bdc5 --- bindep.txt | 2 ++ tox.ini | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/bindep.txt b/bindep.txt index 2fef68fdd8..485ec86850 100644 --- a/bindep.txt +++ b/bindep.txt @@ -11,6 +11,8 @@ libffi-devel [platform:rpm] memcached python-dev [platform:dpkg] python-devel [platform:rpm] +python3-dev [platform:dpkg] +python3-devel [platform:rpm] rsync xfsprogs libssl-dev [platform:dpkg] diff --git a/tox.ini b/tox.ini index 9b6464a8d0..0c02826b5a 100644 --- a/tox.ini +++ b/tox.ini @@ -45,6 +45,7 @@ commands = [testenv:py3pep8] basepython = python3 install_command = echo {packages} +whitelist_externals = echo commands = # Gross hack. There's no other way to get it to /not/ install swift itself # (which triggers installing eventlet) but also get flake8 installed. @@ -53,6 +54,7 @@ commands = flake8 --filename=swift* bin [testenv:func] +basepython = python2.7 commands = ./.functests {posargs} [testenv:func-fast-post] @@ -69,6 +71,7 @@ setenv = SWIFT_TEST_IN_PROCESS=1 commands = {posargs} [testenv:docs] +basepython = python2.7 commands = python setup.py build_sphinx [testenv:api-ref] @@ -77,6 +80,7 @@ commands = python setup.py build_sphinx # we do not use -W here because we are doing some slightly tricky # things to build a single page document, and as such, we are ok # ignoring the duplicate stanzas warning. +basepython = python2.7 commands = rm -rf api-ref/build sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html