getlasso.sh: use python2 as interpret

This commit is contained in:
Benjamin Dauvergne 2020-08-13 15:32:40 +02:00
parent 6d0a064d6a
commit 8bfb36e8f9
1 changed files with 3 additions and 2 deletions

View File

@ -1,12 +1,13 @@
#!/bin/sh
PYTHON=`which python2 python | head -n1`
# Get venv site-packages path
DSTDIR=`python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'`
DSTDIR=`$PYTHON -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'`
# Get not venv site-packages path
# Remove first path (assuming that is the venv path)
NONPATH=`echo $PATH | sed 's/^[^:]*://'`
SRCDIR=`PATH=$NONPATH python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'`
SRCDIR=`PATH=$NONPATH $PYTHON -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'`
# Clean up
rm -f $DSTDIR/lasso.*