Skip to content

Commit

Permalink
Replace setup.py by pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Viicos committed Feb 4, 2024
1 parent 1928748 commit e2308dd
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 94 deletions.
19 changes: 0 additions & 19 deletions .coveragerc

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Tox and any other packages
Expand All @@ -39,9 +39,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install Tox
Expand Down
99 changes: 99 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
[build-system]
requires = ["setuptools>=61.0.0"]
build-backend = "setuptools.build_meta"

[project]
name = "django-two-factor-auth"
version = "1.16.0"
description = "Complete Two-Factor Authentication for Django"
readme = "README.rst"
authors = [
{name = "Bouke Haarsma", email = "bouke@haarsma.eu"},
]
maintainers = [
{name = "Claude Paroz", email = "claude@2xlibre.net"},
]
license = {text = "MIT"}
requires-python = ">= 3.8"
dependencies = [
"Django>=3.2",
"django_otp>=0.8.0",
"qrcode>=4.0.0,<7.99",
"django-phonenumber-field<8",
"django-formtools",
]
keywords = ["django", "two-factor"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Security",
"Topic :: System :: Systems Administration :: Authentication/Directory",
]

[project.optional-dependencies]
call = ['twilio>=6.0']
sms = ['twilio>=6.0']
webauthn = ['webauthn>=2.0,<2.99']
yubikey = ['django-otp-yubikey']
phonenumbers = ['phonenumbers>=7.0.9,<8.99']
phonenumberslite = ['phonenumberslite>=7.0.9,<8.99']
# used internally for local development & CI
tests = [
"coverage",
"freezegun",
"tox",
]
linting = [
"flake8<=6.99",
"isort<=5.99",
]

[project.urls]
Homepage = "https://github.com/jazzband/django-two-factor-auth"
Documentation = "https://django-two-factor-auth.readthedocs.io/en/stable/"
Changelog = "https://github.com/jazzband/django-two-factor-auth/blob/master/CHANGELOG.md"

[tool.isort]
combine_as_imports = true
default_section = "THIRDPARTY"
include_trailing_comma = true
known_first_party = "two_factor"
line_length = 79
multi_line_output = 5
sections="FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER"

[tool.coverage.run]
branch = true
source = [
"tests",
"two_factor",
]
omit = ["*/migrations/*"]

[tool.coverage.report]
exclude_also = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain about missing debug-only code:
"def __repr__",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
]
9 changes: 0 additions & 9 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
[flake8]
exclude = build,dist,docs,.tox,./two_factor/views/__init__.py
max-line-length = 119

[isort]
combine_as_imports = true
default_section = THIRDPARTY
include_trailing_comma = true
known_first_party = two_factor
line_length = 79
multi_line_output = 5
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
63 changes: 0 additions & 63 deletions setup.py

This file was deleted.

0 comments on commit e2308dd

Please sign in to comment.