forked from Github-Mirrors/canaille
259 lines
5.6 KiB
TOML
259 lines
5.6 KiB
TOML
[build-system]
|
||
requires = ["poetry-core>=1.0.0", "babel", "setuptools; python_version>='3.12'"]
|
||
build-backend = "poetry.core.masonry.api"
|
||
|
||
[tool]
|
||
[tool.poetry]
|
||
name = "Canaille"
|
||
version = "0.0.55"
|
||
description = "Lightweight identity and authorization management software"
|
||
license = "MIT"
|
||
keywords = ["oidc", "oauth", "oauth2", "openid", "identity"]
|
||
classifiers = [
|
||
"Intended Audience :: Developers",
|
||
"Development Status :: 3 - Alpha",
|
||
"Programming Language :: Python :: 3.10",
|
||
"Programming Language :: Python :: 3.11",
|
||
"Programming Language :: Python :: 3.12",
|
||
"Programming Language :: Python :: 3.13",
|
||
"Programming Language :: Python :: Implementation :: CPython",
|
||
"License :: OSI Approved :: MIT License",
|
||
"Environment :: Web Environment",
|
||
"Programming Language :: Python",
|
||
"Operating System :: OS Independent",
|
||
"Topic :: System :: Systems Administration :: Authentication/Directory",
|
||
"Topic :: System :: Systems Administration :: Authentication/Directory :: LDAP",
|
||
|
||
]
|
||
authors = ["Yaal Coop <contact@yaal.coop>"]
|
||
maintainers = [
|
||
"Éloi Rivard <eloi@yaal.coop>",
|
||
]
|
||
homepage = "https://canaille.yaal.coop"
|
||
documentation = "https://canaille.readthedocs.io/en/latest/"
|
||
repository = "https://gitlab.com/yaal/canaille"
|
||
readme = "README.md"
|
||
include = ["canaille/translations/*/LC_MESSAGES/*.mo"]
|
||
|
||
[tool.poetry.dependencies]
|
||
python = "^3.10"
|
||
flask = "^3.0.0"
|
||
flask-wtf = "^1.2.1"
|
||
pydantic-settings = "^2.0.3"
|
||
wtforms = "^3.1.1"
|
||
|
||
# extra : front
|
||
email_validator = {version = "^2.0.0", optional=true}
|
||
flask-babel = {version = "^4.0.0", optional=true}
|
||
flask-themer = {version = "^2.0.0", optional=true}
|
||
pycountry = {version = ">=22.1.10", optional=true}
|
||
pytz = {version = ">=2022.7", optional=true}
|
||
toml = {version = "^0.10.0", optional=true, python = "<3.11"}
|
||
|
||
# extra : oidc
|
||
authlib = {version = "^1.2.1", optional=true}
|
||
|
||
# extra : ldap
|
||
python-ldap = {version = "^3.4.0", optional=true}
|
||
|
||
# extra : sentry
|
||
sentry-sdk = {version = "^2.0.0", optional=true, extras=["flask"]}
|
||
|
||
# extra : sql
|
||
passlib = {version = "^1.7.4", optional=true}
|
||
sqlalchemy = {version = "^2.0.23", optional=true}
|
||
sqlalchemy-json = {version = "^0.7.0", optional=true}
|
||
sqlalchemy-utils = {version = "^0.41.1", optional=true}
|
||
|
||
[tool.poetry.group.doc]
|
||
optional = true
|
||
|
||
[tool.poetry.group.doc.dependencies]
|
||
autodoc-pydantic = "^2.0.1"
|
||
shibuya = "^2024.3.1"
|
||
sphinx = ">=7.0.0"
|
||
sphinx-design = "^0.6.0"
|
||
sphinx-issues = "^5.0.0"
|
||
sphinx-click = "^6.0.0"
|
||
|
||
[tool.poetry.group.dev.dependencies]
|
||
coverage = {version = "*", extras=["toml"]}
|
||
faker = "*"
|
||
flask-webtest = "*"
|
||
# pre-commit version is fixed until docformatted hook is compatible
|
||
# https://github.com/PyCQA/docformatter/issues/293
|
||
pre-commit = "^3.0.0"
|
||
pyquery = "*"
|
||
pytest = "^8.0.0"
|
||
pytest-coverage = "*"
|
||
pytest-httpserver = "*"
|
||
pytest-lazy-fixtures = "^1.0.7"
|
||
pytest-smtpd = "^0.1.0"
|
||
pytest-xdist = "^3.3.1"
|
||
slapd = "*"
|
||
time-machine = "^2.14.1"
|
||
toml = "^0.10.0"
|
||
|
||
# Babel 2.14 does not directly depend on setuptools
|
||
# https://github.com/python-babel/babel/blob/40e60a1f6cf178d9f57fcc14f157ea1b2ab77361/CHANGES.rst?plain=1#L22-L24
|
||
# and neither python 3.12 due to PEP 632
|
||
# https://peps.python.org/pep-0632/
|
||
setuptools = {version = "*", python = ">=3.12"}
|
||
|
||
[tool.poetry.group.demo]
|
||
optional = true
|
||
|
||
[tool.poetry.group.demo.dependencies]
|
||
faker = "*"
|
||
honcho = "*"
|
||
slapd = "*"
|
||
requests = "*"
|
||
watchdog = "^4.0.0"
|
||
|
||
[tool.poetry.extras]
|
||
front = [
|
||
"click",
|
||
"email_validator",
|
||
"flask-babel",
|
||
"flask-themer",
|
||
"pycountry",
|
||
"pytz",
|
||
"toml",
|
||
]
|
||
ldap = [
|
||
"python-ldap",
|
||
]
|
||
oidc = [
|
||
"authlib",
|
||
]
|
||
sentry = [
|
||
"sentry-sdk",
|
||
]
|
||
sql = [
|
||
"passlib",
|
||
"sqlalchemy",
|
||
"sqlalchemy-json",
|
||
"sqlalchemy-utils",
|
||
]
|
||
all = [
|
||
"click",
|
||
"email_validator",
|
||
"flask-babel",
|
||
"flask-themer",
|
||
"passlib",
|
||
"pycountry",
|
||
"pytz",
|
||
"toml",
|
||
"python-ldap",
|
||
"authlib",
|
||
"sentry-sdk",
|
||
"sqlalchemy",
|
||
"sqlalchemy-json",
|
||
"sqlalchemy-utils",
|
||
]
|
||
|
||
[tool.poetry.scripts]
|
||
canaille = "canaille.commands:cli"
|
||
|
||
[options.packages.find]
|
||
exclude = [
|
||
"tests",
|
||
"tests.*",
|
||
"doc",
|
||
"doc.*",
|
||
]
|
||
|
||
[tool.poetry.build]
|
||
generate-setup-file = false
|
||
script = "build.py"
|
||
|
||
[tool.coverage.run]
|
||
source = [
|
||
"canaille",
|
||
"tests",
|
||
]
|
||
omit = [".tox/*"]
|
||
branch = true
|
||
|
||
[tool.coverage.report]
|
||
exclude_lines = [
|
||
"@pytest.mark.skip",
|
||
"pragma: no cover",
|
||
"raise NotImplementedError",
|
||
"except ImportError",
|
||
"if app.debug",
|
||
]
|
||
|
||
[tool.ruff.lint]
|
||
select = [
|
||
"E", # pycodestyle
|
||
"F", # pyflakes
|
||
"I", # isort
|
||
"UP", # pyupgrade
|
||
]
|
||
ignore = [
|
||
"E501", # line-too-long
|
||
"E722", # bare-except
|
||
]
|
||
|
||
[tool.ruff.lint.isort]
|
||
force-single-line = true
|
||
|
||
[tool.ruff.format]
|
||
docstring-code-format = true
|
||
|
||
[tool.tox]
|
||
legacy_tox_ini = """
|
||
[tox]
|
||
isolated_build = true
|
||
skipsdist = true
|
||
envlist =
|
||
style
|
||
py310
|
||
py311
|
||
py312
|
||
py313
|
||
doc
|
||
coverage
|
||
|
||
[testenv]
|
||
allowlist_externals = poetry
|
||
commands =
|
||
poetry install --extras all
|
||
poetry run pytest --showlocals --full-trace {posargs}
|
||
|
||
[testenv:style]
|
||
commands =
|
||
pip install pre-commit<4
|
||
pre-commit run --all-files
|
||
|
||
[testenv:doc]
|
||
commands =
|
||
poetry install --with doc --without dev --extras oidc
|
||
poetry run sphinx-build doc build/sphinx/html
|
||
|
||
[testenv:coverage]
|
||
commands =
|
||
poetry install --extras all
|
||
poetry run pytest --cov --cov-fail-under=100 --cov-report term:skip-covered {posargs:-n auto}
|
||
poetry run coverage html
|
||
"""
|
||
|
||
[[tool.babel.mappings]]
|
||
method = "python"
|
||
pattern = "**.py"
|
||
|
||
[[tool.babel.mappings]]
|
||
method = "jinja2"
|
||
pattern = "**/templates/**.html"
|
||
trimmed = "true"
|
||
|
||
[[tool.babel.mappings]]
|
||
method = "jinja2"
|
||
pattern = "**/themes/**.html"
|
||
trimmed = "true"
|
||
|
||
[[tool.babel.mappings]]
|
||
method = "jinja2"
|
||
pattern = "**/templates/**.txt"
|
||
trimmed = "true"
|