diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..973b5a9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +.coverage +.tox/ +build/ +dist/ +venv/ + +*~ +*.egg-info +*.pyc +*.swp diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..8dce522 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include LICENSE README.rst diff --git a/runtests.py b/runtests.py new file mode 100644 index 0000000..2e8d4e7 --- /dev/null +++ b/runtests.py @@ -0,0 +1,14 @@ +import os +import sys + +import django +from django.conf import settings +from django.test.utils import get_runner + +if __name__ == '__main__': + os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' + django.setup() + TestRunner = get_runner(settings) + test_runner = TestRunner() + failures = test_runner.run_tests(sys.argv[1:] or ['tests']) + sys.exit(bool(failures)) diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..82951d1 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,16 @@ +[flake8] +# E731: lambda expression +ignore = E731 + +[isort] +combine_as_imports = True +default_section = THIRDPARTY +include_trailing_comma = True +known_django = django +known_first_party = allauth_cas +multi_line_output = 5 +not_skip = __init__.py +sections = FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER + +[bdist_wheel] +universal = 1 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..da30033 --- /dev/null +++ b/setup.py @@ -0,0 +1,51 @@ +import os + +from setuptools import find_packages, setup + +from allauth_cas import __version__ + +BASE_DIR = os.path.dirname(__file__) + +with open(os.path.join(BASE_DIR, 'README.rst')) as readme: + README = readme.read() + +setup( + name='django-allauth-cas', + version=__version__, + description='CAS support for django-allauth.', + author='Aurélien Delobelle', + author_email='aurelien.delobelle@gmail.com', + keyword='django allauth cas authentication', + long_description=README, + url='https://github.com/aureplop/django-allauth-cas', + classifiers=[ + 'Development Status :: 3 - Alpha', + 'Environment :: Web Environment', + 'Framework :: Django', + 'Framework :: Django :: 1.8', + 'Framework :: Django :: 1.9', + 'Framework :: Django :: 1.10', + 'Framework :: Django :: 1.11', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Topic :: Internet :: WWW/HTTP', + ], + license='MIT', + packages=find_packages(exclude=['tests']), + include_package_data=True, + install_requires=[ + 'django-allauth', + 'python-cas', + ], + extras_require={ + 'tests': ['tox'], + }, +) diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..1a15627 --- /dev/null +++ b/tox.ini @@ -0,0 +1,29 @@ +[tox] +envlist = + py{34,35}-django{18,19,110} + py{34,35,36}-django111, + flake8, + isort + +[testenv] +deps = + django18: django>=1.8,<1.9 + django19: django>=1.9,<1.10 + django110: django>=1.10,<1.11 + django111: django>=1.11,<2.0 + coverage +usedevelop= True +commands = + coverage run \ + --branch \ + --source=allauth_cas --omit=*migrations* \ + ./runtests.py {posargs} + coverage report --show-missing + +[testenv:flake8] +deps = flake8 +commands = flake8 allauth_cas tests + +[testenv:isort] +deps = isort +commands = isort --recursive --check-only --diff allauth_cas tests