provide a py3-compliant tox.ini file (#41220)
This commit is contained in:
parent
c4a21af754
commit
9c6baea77b
|
@ -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
|
13
tox.ini
13
tox.ini
|
@ -5,11 +5,10 @@
|
||||||
|
|
||||||
[tox]
|
[tox]
|
||||||
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/authentic2-cut/{env:BRANCH_NAME:}
|
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/authentic2-cut/{env:BRANCH_NAME:}
|
||||||
envlist = coverage-dj111-pg
|
envlist = py{27,3}-coverage-dj111-pg
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
# django.contrib.auth is not tested it does not work with our templates
|
# django.contrib.auth is not tested it does not work with our templates
|
||||||
basepython = python2
|
|
||||||
setenv =
|
setenv =
|
||||||
AUTHENTIC2_SETTINGS_FILE=tests/settings.py
|
AUTHENTIC2_SETTINGS_FILE=tests/settings.py
|
||||||
DJANGO_SETTINGS_MODULE=authentic2.settings
|
DJANGO_SETTINGS_MODULE=authentic2.settings
|
||||||
|
@ -21,9 +20,6 @@ usedevelop =
|
||||||
coverage: True
|
coverage: True
|
||||||
nocoverage: False
|
nocoverage: False
|
||||||
deps =
|
deps =
|
||||||
dj18: django>=1.8,<1.9
|
|
||||||
dj18: django-tables2<1.1
|
|
||||||
dj18: django-jsonfield<1.1
|
|
||||||
dj111: django>=1.11,<1.12
|
dj111: django>=1.11,<1.12
|
||||||
dj111: django-tables2>=1.1,<2
|
dj111: django-tables2>=1.1,<2
|
||||||
pg: psycopg2
|
pg: psycopg2
|
||||||
|
@ -44,9 +40,10 @@ deps =
|
||||||
requests
|
requests
|
||||||
pytest-freezegun
|
pytest-freezegun
|
||||||
enum34<=1.1.6
|
enum34<=1.1.6
|
||||||
|
py27: django-appconf<1.0.4
|
||||||
http://git.entrouvert.org/authentic.git/snapshot/authentic-master.tar.gz
|
http://git.entrouvert.org/authentic.git/snapshot/authentic-master.tar.gz
|
||||||
http://git.entrouvert.org/authentic2-auth-fc.git/snapshot/authentic2-auth-fc-master.tar.gz
|
|
||||||
commands =
|
commands =
|
||||||
./getlasso.sh
|
py27: ./getlasso.sh
|
||||||
dj18: ./pylint.sh src/authentic2_cut
|
py3: ./getlasso3.sh
|
||||||
|
dj111: ./pylint.sh src/authentic2_cut
|
||||||
py.test {env:FAST:} {env:COVERAGE:} {posargs:tests/}
|
py.test {env:FAST:} {env:COVERAGE:} {posargs:tests/}
|
||||||
|
|
Loading…
Reference in New Issue