Merge "Validate that python3 is ready for loguserdata"

This commit is contained in:
Jenkins 2016-08-26 21:22:49 +00:00 committed by Gerrit Code Review
commit 1c0987e605
1 changed files with 5 additions and 1 deletions

View File

@ -12,7 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
"true" '''\'
if hash python3 2>/dev/null; then
# NOTE(vgridnev): ubuntu trusty by default has python3,
# but pkg_resources can't be imported.
echo "import pkg_resources" | python3 2>/dev/null
has_py3=$?
if [ $has_py3 = 0 ]; then
interpreter="python3"
else
interpreter="python"