jjb: fix babeltrace pylint script
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 9 Jun 2016 19:49:54 +0000 (15:49 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Thu, 9 Jun 2016 19:49:54 +0000 (15:49 -0400)
scripts/babeltrace/pylint.sh

index 4a7e38aa1363034edb67f29b276d5a72d19daef7..80637f6adc217249fd6cd256a813bdad76936e52 100755 (executable)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 BABELTRACE_DIR="deps/babeltrace/build"
-BINDINGS_DIR="$BABELTRACE_DIR/lib/python3.4/dist-packages/babeltrace"
+
+PYTHON3=python3
+P3_VERSION=$($PYTHON3 -c "import sys;print(sys.version[:3])")
+
+BINDINGS_DIR="$BABELTRACE_DIR/lib/python${P3_VERSION}/dist-packages/babeltrace"
 
 PYENV_HOME="$WORKSPACE/.pyenv/"
 
@@ -26,7 +30,7 @@ if [ -d $PYENV_HOME ]; then
 fi
 
 # Create virtualenv and install necessary packages
-virtualenv --system-site-packages -p python3 $PYENV_HOME
+virtualenv --system-site-packages -p ${PYTHON3} $PYENV_HOME
 
 set +u
 . $PYENV_HOME/bin/activate
This page took 0.023341 seconds and 4 git commands to generate.