From d1a8965b5a1274ebb637a3f245311966ca0275dc Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Fri, 30 Oct 2015 06:09:12 +0100 Subject: [PATCH 1/2] tests: test compiling with python3 if given as shebang interpreter Currently plugins fail to compile if they use Python 3 syntax features, even though they use a correct shebang. --- t/test.t | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/t/test.t b/t/test.t index a12151fb..7bc55d0b 100644 --- a/t/test.t +++ b/t/test.t @@ -94,6 +94,14 @@ sub process_file { } ); } + elsif ( $interpreter =~ m{python3} ) { + run_check( + { command => [ 'python3', '-m', 'py_compile', $file ], + description => 'python3 compile', + filename => $filename + } + ); + } elsif ( $interpreter =~ m{python} ) { run_check( { command => [ 'python', '-m', 'py_compile', $file ], From 702db510b607c7b98586e61032427eb8b34642b5 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Fri, 30 Oct 2015 20:53:20 +0100 Subject: [PATCH 2/2] add "python3" to the travis environment --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 64c7c5d7..76144bd2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: perl install: - sudo apt-get update - - sudo apt-get --no-install-recommends install devscripts python ruby php5-cli gawk ksh pylint + - sudo apt-get --no-install-recommends install devscripts python python3 ruby php5-cli gawk ksh pylint - sudo apt-get --no-install-recommends install pkg-config libdb-dev libvirt-dev libexpat-dev # - Munin/Plugin.pm is in "munin-node" on precise - sudo apt-get --no-install-recommends install munin-node