diff --git a/.gitignore b/.gitignore index 27c6770f1..bb0677675 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ log.log authentic2/locale/fr/LC_MESSAGES/django.mo local_settings.* *.egg-info -*.mo \ No newline at end of file +*.mo +.tox diff --git a/MANIFEST.in b/MANIFEST.in index 91e493fe4..8d0f4b9ef 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -44,6 +44,8 @@ include diagnose.py include ez_setup.py include authentic2/auth2_auth/auth2_ssl/authentic_ssl.vhost include requirements.txt +include test_settings +include getlasso.sh include authentic2/vendor/dpam/LICENSE include authentic2/nonce/README.rst include doc/conf.py doc/Makefile doc/README.rst.bak diff --git a/getlasso.sh b/getlasso.sh new file mode 100755 index 000000000..680da393e --- /dev/null +++ b/getlasso.sh @@ -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 + diff --git a/requirements.txt b/requirements.txt index 26ef68c53..53928f45b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -Django<1.6 +Django>1.5,<1.7 south>=0.8.4 requests django-model-utils diff --git a/setup.py b/setup.py index 86643c3bb..13b3130fd 100755 --- a/setup.py +++ b/setup.py @@ -113,7 +113,7 @@ setup(name="authentic2", scripts = ('authentic2-ctl',), packages=find_packages(), include_package_data=True, - install_requires=['django < 1.6', + install_requires=['django >= 1.5, < 1.7', 'south>=0.8.4', 'requests', 'django-model-utils', diff --git a/test_settings b/test_settings new file mode 100644 index 000000000..101830c9e --- /dev/null +++ b/test_settings @@ -0,0 +1,34 @@ +import os.path + +DEBUG = False + +if DEBUG: + DEBUG_TOOLBAR = True + TEMPLATE_DEBUG = True + DEBUG_TOOLBAR_CONFIG = { + 'INTERCEPT_REDIRECTS': False, + } +INTERNAL_IPS = ('127.0.0.1',) + +SECRET_KEY = 'coin' + +from authentic2.settings import INSTALLED_APPS, \ + MIDDLEWARE_CLASSES + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(os.path.dirname(__file__), 'authentic2.sqlite'), + }, +} + +if DEBUG: + INSTALLED_APPS += ('debug_toolbar',) + MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',) + + +LANGUAGE_CODE = 'en' + +IDP_SAML2 = True +#IDP_OPENID = True + diff --git a/tox.ini b/tox.ini new file mode 100644 index 000000000..e7cc24530 --- /dev/null +++ b/tox.ini @@ -0,0 +1,25 @@ +# Tox (http://tox.testrun.org/) is a tool for running tests +# in multiple virtualenvs. This configuration file will run the +# test suite on all supported python versions. To use it, "pip install tox" +# and then run "tox" from this directory. + +[tox] +envlist = django15, django16 + +[testenv:django15] +commands = + ./getlasso.sh + ln -sf test_settings local_settings.py + ./authentic2-ctl test auth contenttypes sessions messages admin_tools theming menu dashboard authentic2 +deps = django>1.5,<1.6 + +[testenv:django16] +commands = + ./getlasso.sh + ln -sf test_settings local_settings.py + ./authentic2-ctl test django.contrib.auth django.contrib.contenttypes django.contrib.sessions django.contrib.messages admin_tools authentic2 +deps = django>1.6,<1.7 + + + +