Projet

Général

Profil

0002-misc-remove-sitepackages-True-from-tox.ini-70163.patch

Benjamin Dauvergne, 12 octobre 2022 15:04

Télécharger (1,75 ko)

Voir les différences:

Subject: [PATCH 2/2] 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).
 getlasso3.sh | 17 +++++++++++++++++
 tox.ini      |  3 ++-
 2 files changed, 19 insertions(+), 1 deletion(-)
 create mode 100755 getlasso3.sh
getlasso3.sh
1
#!/bin/sh
2

  
3
# Get venv site-packages path
4
DSTDIR=`python3 -c 'import sysconfig; print(sysconfig.get_path("platlib"))'`
5

  
6
# Clean up
7
rm -f $DSTDIR/lasso.*
8
rm -f $DSTDIR/_lasso.*
9

  
10
# Link
11
ln -sv /usr/lib/python3/dist-packages/lasso.py $DSTDIR/
12
for SOFILE in /usr/lib/python3/dist-packages/_lasso.cpython-*.so
13
do
14
  ln -sv $SOFILE $DSTDIR/
15
done
16

  
17
exit 0
tox.ini
3 3
envlist = py3-django22-codestyle-coverage, pylint
4 4

  
5 5
[testenv]
6
sitepackages = true
7 6
setenv =
8 7
    NUMPROCESSES={env:NUMPROCESSES:1}
9 8
    SETUPTOOLS_USE_DISTUTILS=stdlib
......
37 36
# others...
38 37
    django22: django>=2.2,<2.3
39 38
commands =
39
    ./getlasso3.sh
40 40
    py.test {posargs:-v {env:COVERAGE:} --numprocesses={env:NUMPROCESSES:1} --dist loadfile --junitxml=junit-{envname}.xml tests/}
41 41
    codestyle: pre-commit run --all-files --show-diff-on-failure
42 42

  
......
71 71
    pre-commit
72 72
    pyzbar
73 73
commands =
74
    ./getlasso3.sh
74 75
    ./pylint.sh wcs/ tests/
75
-