misc: remove sitepackages=True from tox.ini (#70163)

It needs getlasso3.sh to get Lasso from the environment (Lasso's python
binding cannot be installed through pip).
This commit is contained in:
Benjamin Dauvergne 2022-10-12 12:26:39 +02:00
parent 8740de66f1
commit 9a8bb6929c
2 changed files with 19 additions and 1 deletions

17
getlasso3.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
# Get venv site-packages path
DSTDIR=`python3 -c 'import sysconfig; print(sysconfig.get_path("platlib"))'`
# 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

View File

@ -3,7 +3,6 @@ toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/wcs/{env:BRANCH_NAME:main}/{env:EX
envlist = py3-django22-codestyle-coverage, pylint
[testenv]
sitepackages = true
setenv =
NUMPROCESSES={env:NUMPROCESSES:1}
SETUPTOOLS_USE_DISTUTILS=stdlib
@ -37,6 +36,7 @@ deps =
# others...
django22: django>=2.2,<2.3
commands =
./getlasso3.sh
py.test {posargs:-v {env:COVERAGE:} --numprocesses={env:NUMPROCESSES:1} --dist loadfile --junitxml=junit-{envname}.xml tests/}
codestyle: pre-commit run --all-files --show-diff-on-failure
@ -71,4 +71,5 @@ deps =
pre-commit
pyzbar
commands =
./getlasso3.sh
./pylint.sh wcs/ tests/