diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..7004dd5 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +python_paths = . diff --git a/setup.py b/setup.py index db15192..8f7e61d 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- -try: - from setuptools import setup -except ImportError: - from distutils.core import setup - -from setuptools import find_packages +from setuptools import setup, find_packages +with open('README.rst', 'r', encoding='utf-8') as f: + long_description = f.read() setup( name='django-password-reset', @@ -17,23 +14,22 @@ url='https://github.com/brutasse/django-password-reset', license='BSD licence, see LICENSE file', description='Class-based views for password reset.', - long_description=open('README.rst').read(), + long_description=long_description, + long_description_content_type='text/x-rst', install_requires=[ - 'Django>=1.11', + 'Django>=4.0', ], classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Framework :: Django', - 'Framework :: Django :: 1.11', - 'Framework :: Django :: 2.0', - 'Framework :: Django :: 2.1', + 'Framework :: Django :: 4.0', + 'Framework :: Django :: 5.1', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Programming Language :: Python', 'Programming Language :: Python :: 3', ], - test_suite='runtests.runtests', zip_safe=False, ) diff --git a/tox.ini b/tox.ini index 9421329..8b06905 100644 --- a/tox.ini +++ b/tox.ini @@ -1,22 +1,25 @@ [tox] -qenvlist = - py38-django{30,40}, +envlist = py39-django{30,40}, - py310-django{30,40}, - docs, lint + py310-django{30,40,50}, + docs, + lint [testenv] -commands = python -Wall setup.py test # or your test command -basepython = - py38: python3.8 - py39: python3.9 - py310: python3.10 +setenv = + DJANGO_SETTINGS_MODULE = password_reset.tests.settings + PYTHONPATH = {toxinidir} deps = + pytest + pytest-django django30: Django>=3.0,<4.0 django40: Django>=4.0,<5.0 + django50: Django>=5.0,<6.0 +commands = pytest [testenv:docs] -basepython = python3.9 +description = Build the documentation using Sphinx +basepython = python3.10 changedir = docs deps = Sphinx @@ -25,7 +28,8 @@ commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html [testenv:lint] -basepython = python3.9 +description = Run flake8 linter on the codebase +basepython = python3.10 deps = flake8 commands =