add files for setup & tests

This commit is contained in:
Aurélien Delobelle 2017-07-22 18:29:14 +02:00
parent f1796f9f11
commit f6a7dbc385
7 changed files with 121 additions and 0 deletions

10
.gitignore vendored Normal file
View file

@ -0,0 +1,10 @@
.coverage
.tox/
build/
dist/
venv/
*~
*.egg-info
*.pyc
*.swp

1
MANIFEST.in Normal file
View file

@ -0,0 +1 @@
include LICENSE README.rst

14
runtests.py Normal file
View file

@ -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))

16
setup.cfg Normal file
View file

@ -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

51
setup.py Normal file
View file

@ -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'],
},
)

0
tests/__init__.py Normal file
View file

29
tox.ini Normal file
View file

@ -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