From 156cca250115bae09509ec52445fa662baaeae65 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 24 Dec 2019 08:51:21 +0100 Subject: [PATCH 3/3] tox.ini: link lasso inside tox venv (#38697) --- getlasso3.sh | 22 ++++++++++++++++++++++ tox.ini | 2 ++ 2 files changed, 24 insertions(+) create mode 100755 getlasso3.sh diff --git a/getlasso3.sh b/getlasso3.sh new file mode 100755 index 00000000..9266a728 --- /dev/null +++ b/getlasso3.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# Get venv site-packages path +DSTDIR=`python3 -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 python3 -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 /usr/lib/python3/dist-packages/lasso.py $DSTDIR/ +for SOFILE in /usr/lib/python3/dist-packages/_lasso.cpython-*.so +do + ln -sv $SOFILE $DSTDIR/ +done + +exit 0 diff --git a/tox.ini b/tox.ini index f3265788..87bbaccf 100644 --- a/tox.ini +++ b/tox.ini @@ -42,5 +42,7 @@ deps = py2: Quixote<3 py3: Quixote>=3.0 commands = + py2: ./getlasso.sh + py3: ./getlasso3.sh py.test -v {env:COVERAGE:} --junitxml=junit-{envname}.xml {posargs:tests/} pylint: ./pylint.sh wcs/ -- 2.24.0