tox: add missing getlasso.sh (#24191)

This commit is contained in:
Frédéric Péters 2018-06-08 15:49:01 +02:00
parent 2948c26c2f
commit 644423da92
1 changed files with 20 additions and 0 deletions

20
getlasso.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh
# Get venv site-packages path
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())'`
# Clean up
rm -f $DSTDIR/lasso.*
rm -f $DSTDIR/_lasso.*
# Link
ln -sv $SRCDIR/lasso.py $DSTDIR
ln -sv $SRCDIR/_lasso.* $DSTDIR
exit 0