lttng-ust: checkout sources in a subdirectory
[lttng-ci.git] / scripts / lttng-analyses / pylint.sh
index 334cda525ffe9a0c143f43e49106d011d6e2bacc..72f47cab44f929751829c52768e7824403b09a0d 100755 (executable)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+PYTHON3="python3"
+P3_VERSION=$($PYTHON3 -c "import sys;print(sys.version[:3])")
 
 BABELTRACE_DIR=$WORKSPACE/deps/babeltrace/build
 
 export LD_LIBRARY_PATH="$BABELTRACE_DIR/lib"
-export PYTHONPATH="$BABELTRACE_DIR/python3.4/dist-packages/"
+export PYTHONPATH="$BABELTRACE_DIR/lib/python${P3_VERSION}/dist-packages/"
 
 PYENV_HOME=$WORKSPACE/.pyenv/
 
@@ -29,7 +31,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.023423 seconds and 4 git commands to generate.