diff --git a/pyproject.toml b/pyproject.toml index 2adfd6a..2507222 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,6 +50,20 @@ dependencies = [ [project.urls] Homepage = "https://github.com/valohai/django-allauth-2fa" +[project.optional-dependencies] +test = [ + "pytest-cov==4.1.0", + "pytest-django==4.5.2", +] +docs = [ + "Sphinx==1.6.5", + "sphinx-autobuild==0.7.1", # To auto-build docs as they're edited. + "sphinx-rtd-theme==0.2.4", # The Read the Docs theme for Sphinx. +] + +[tool.hatch.envs.default] +features = ["test"] + [tool.hatch.version] path = "allauth_2fa/__init__.py" diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 5b9dc7d..0000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,15 +0,0 @@ -# Dependencies required for installing the package are defined in setup.cfg. -# Dependencies for tests are in requirements-test.txt. - --e . # Install the current directory as an editable package. - -# Nice for development. -django-extensions==2.2.6 -ipdb==0.12.3 -ipython==8.10.0 -Werkzeug==2.2.3 - -# For documentation. -Sphinx==1.6.5 -sphinx-autobuild==0.7.1 # To auto-build docs as they're edited. -sphinx-rtd-theme==0.2.4 # The Read the Docs theme for Sphinx. diff --git a/requirements-test.txt b/requirements-test.txt deleted file mode 100644 index 6a246a3..0000000 --- a/requirements-test.txt +++ /dev/null @@ -1,2 +0,0 @@ -pytest-cov -pytest-django~=4.5.2 diff --git a/tox.ini b/tox.ini index 4651395..a0d125f 100644 --- a/tox.ini +++ b/tox.ini @@ -25,7 +25,7 @@ python = commands = pytest --cov . --cov-report html --cov-report term-missing --cov-report xml:{envdir}/coverage-{envname}.xml deps = - -r requirements-test.txt + .[test] django41: Django>=4.1,<4.2 django42: Django>=4.2,<4.3 djangomain: https://codeload.github.com/django/django/zip/main