2022-05-13 09:44:23 +00:00
|
|
|
|
[build-system]
|
2024-11-14 11:12:33 +00:00
|
|
|
|
requires = ["hatchling", "babel", "setuptools >= 50.0.0; python_version<'3.13'"]
|
2024-10-28 08:01:52 +00:00
|
|
|
|
build-backend = "hatchling.build"
|
2022-05-13 09:44:23 +00:00
|
|
|
|
|
2024-10-28 08:01:52 +00:00
|
|
|
|
[project]
|
2022-05-13 09:44:23 +00:00
|
|
|
|
name = "Canaille"
|
2024-11-07 12:53:31 +00:00
|
|
|
|
version = "0.0.56"
|
2024-04-22 07:47:56 +00:00
|
|
|
|
description = "Lightweight identity and authorization management software"
|
2024-10-28 08:01:52 +00:00
|
|
|
|
license = {file = "LICENSE.rst"}
|
|
|
|
|
readme = "README.md"
|
2024-11-26 13:01:07 +00:00
|
|
|
|
keywords = ["oidc", "oauth", "oauth2", "openid", "identity", "authentication"]
|
2022-05-13 09:44:23 +00:00
|
|
|
|
classifiers = [
|
|
|
|
|
"Intended Audience :: Developers",
|
2023-08-16 14:18:06 +00:00
|
|
|
|
"Development Status :: 3 - Alpha",
|
2022-05-13 09:44:23 +00:00
|
|
|
|
"Programming Language :: Python :: 3.10",
|
2022-11-01 10:49:26 +00:00
|
|
|
|
"Programming Language :: Python :: 3.11",
|
2023-11-01 19:22:26 +00:00
|
|
|
|
"Programming Language :: Python :: 3.12",
|
2024-10-27 10:21:42 +00:00
|
|
|
|
"Programming Language :: Python :: 3.13",
|
2022-05-13 09:44:23 +00:00
|
|
|
|
"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",
|
|
|
|
|
|
|
|
|
|
]
|
2024-10-28 08:01:52 +00:00
|
|
|
|
authors = [{name="Yaal Coop", email="contact@yaal.coop"}]
|
|
|
|
|
maintainers = [{name="Éloi Rivard", email="eloi@yaal.coop"}]
|
|
|
|
|
|
|
|
|
|
requires-python = ">=3.10"
|
|
|
|
|
dependencies = [
|
|
|
|
|
"flask >= 3.0.0",
|
|
|
|
|
"flask-wtf >= 1.2.1",
|
|
|
|
|
"pydantic-settings >= 2.0.3",
|
2024-11-12 16:01:18 +00:00
|
|
|
|
"requests>=2.32.3",
|
2024-10-28 08:01:52 +00:00
|
|
|
|
"wtforms >= 3.1.1",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[project.optional-dependencies]
|
|
|
|
|
front = [
|
|
|
|
|
"email_validator >= 2.0.0",
|
|
|
|
|
"flask-babel >= 4.0.0",
|
|
|
|
|
"flask-themer >= 2.0.0",
|
2024-11-04 22:21:00 +00:00
|
|
|
|
"pycountry >= 23.12.7",
|
2024-10-28 08:01:52 +00:00
|
|
|
|
"pytz >= 2022.7",
|
|
|
|
|
"toml >= 0.10.0",
|
2024-12-06 14:18:18 +00:00
|
|
|
|
"zxcvbn-rs-py >= 0.2.0",
|
2024-10-28 08:01:52 +00:00
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
oidc = [
|
2024-11-05 07:59:24 +00:00
|
|
|
|
"authlib >= 1.3.0",
|
2024-10-28 08:01:52 +00:00
|
|
|
|
]
|
|
|
|
|
|
2024-11-25 16:47:31 +00:00
|
|
|
|
scim = [
|
|
|
|
|
"scim2-models>=0.2.2",
|
2024-12-06 14:15:04 +00:00
|
|
|
|
"authlib >= 1.3.0",
|
2024-11-25 16:47:31 +00:00
|
|
|
|
]
|
|
|
|
|
|
2024-10-28 08:01:52 +00:00
|
|
|
|
ldap = [
|
|
|
|
|
"python-ldap >= 3.4.0",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
sentry = [
|
|
|
|
|
"sentry-sdk >= 2.0.0",
|
2022-05-13 09:44:23 +00:00
|
|
|
|
]
|
2024-10-28 08:01:52 +00:00
|
|
|
|
|
2024-11-07 12:23:25 +00:00
|
|
|
|
sqlite = [
|
2024-10-28 08:01:52 +00:00
|
|
|
|
"passlib >= 1.7.4",
|
|
|
|
|
"sqlalchemy >= 2.0.23",
|
|
|
|
|
"sqlalchemy-json >= 0.7.0",
|
|
|
|
|
"sqlalchemy-utils >= 0.41.1",
|
|
|
|
|
]
|
|
|
|
|
|
2024-11-07 12:23:25 +00:00
|
|
|
|
postgresql = [
|
|
|
|
|
"passlib >= 1.7.4",
|
2024-12-01 16:15:11 +00:00
|
|
|
|
"sqlalchemy[postgresql-psycopg2binary] >= 2.0.23",
|
2024-11-07 12:23:25 +00:00
|
|
|
|
"sqlalchemy-json >= 0.7.0",
|
|
|
|
|
"sqlalchemy-utils >= 0.41.1",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
mysql = [
|
|
|
|
|
"passlib >= 1.7.4",
|
2024-12-03 08:33:44 +00:00
|
|
|
|
"sqlalchemy[mysql-connector] >= 2.0.23",
|
2024-11-07 12:23:25 +00:00
|
|
|
|
"sqlalchemy-json >= 0.7.0",
|
|
|
|
|
"sqlalchemy-utils >= 0.41.1",
|
|
|
|
|
]
|
|
|
|
|
|
2024-11-29 09:32:17 +00:00
|
|
|
|
otp = [
|
|
|
|
|
"otpauth>=2.1.1",
|
|
|
|
|
"pillow>=11.0.0",
|
|
|
|
|
"qrcode>=8.0",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
sms = [
|
|
|
|
|
"smpplib>=2.2.3",
|
|
|
|
|
]
|
|
|
|
|
|
2024-10-28 08:01:52 +00:00
|
|
|
|
[project.urls]
|
2022-06-21 12:30:31 +00:00
|
|
|
|
homepage = "https://canaille.yaal.coop"
|
2022-05-13 09:44:23 +00:00
|
|
|
|
documentation = "https://canaille.readthedocs.io/en/latest/"
|
|
|
|
|
repository = "https://gitlab.com/yaal/canaille"
|
2024-10-28 08:01:52 +00:00
|
|
|
|
|
|
|
|
|
[dependency-groups]
|
|
|
|
|
dev = [
|
2024-10-31 18:05:57 +00:00
|
|
|
|
"babel >= 2.14.0",
|
2024-10-31 17:55:12 +00:00
|
|
|
|
"coverage[toml] >= 6.0.0",
|
2024-10-31 18:05:57 +00:00
|
|
|
|
"faker >= 30.0.0",
|
|
|
|
|
"flask-webtest >= 0.1.6",
|
2024-10-28 08:01:52 +00:00
|
|
|
|
# pre-commit version is fixed until docformatted hook is compatible
|
|
|
|
|
# https://github.com/PyCQA/docformatter/issues/293
|
|
|
|
|
"pre-commit < 4.0.0",
|
2024-11-02 15:55:32 +00:00
|
|
|
|
"pre-commit-uv>=4.1.4",
|
2024-10-31 18:05:57 +00:00
|
|
|
|
"pyquery >= 2.0.0",
|
2024-10-28 08:01:52 +00:00
|
|
|
|
"pytest >= 8.0.0",
|
2024-10-31 18:05:57 +00:00
|
|
|
|
"pytest-cov >= 6.0.0",
|
|
|
|
|
"pytest-httpserver >= 1.1.0",
|
2024-10-28 08:01:52 +00:00
|
|
|
|
"pytest-lazy-fixtures >= 1.0.7",
|
|
|
|
|
"pytest-smtpd >= 0.1.0",
|
|
|
|
|
"pytest-xdist >= 3.3.1",
|
2024-11-25 16:47:31 +00:00
|
|
|
|
"scim2-tester>=0.1.7",
|
2024-10-31 18:05:57 +00:00
|
|
|
|
"slapd >= 0.1.5",
|
2024-10-28 08:01:52 +00:00
|
|
|
|
"time-machine >= 2.14.1",
|
|
|
|
|
"toml >= 0.10.0",
|
|
|
|
|
"tox-uv >= 1.16.0",
|
2024-11-25 16:47:31 +00:00
|
|
|
|
# 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 >= 50.0.0; python_version>='3.12'",
|
2023-08-16 15:14:11 +00:00
|
|
|
|
]
|
2024-10-28 08:01:52 +00:00
|
|
|
|
doc = [
|
|
|
|
|
"autodoc-pydantic >= 2.0.1",
|
2024-12-19 08:48:19 +00:00
|
|
|
|
# used to compute sphinx uuids
|
|
|
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-gettext_uuid
|
|
|
|
|
"levenshtein>=0.26.1",
|
2024-10-28 08:01:52 +00:00
|
|
|
|
"shibuya >= 2024.3.1",
|
|
|
|
|
"sphinx >= 7.0.0",
|
|
|
|
|
"sphinx-design >= 0.6.0",
|
|
|
|
|
"sphinx-issues >= 5.0.0",
|
|
|
|
|
"sphinx-click >= 6.0.0",
|
2024-11-22 15:24:12 +00:00
|
|
|
|
"sphinx-intl>=2.3.0",
|
2024-12-16 17:17:42 +00:00
|
|
|
|
"jinja-autodoc>=0.1.2",
|
2023-11-15 15:37:06 +00:00
|
|
|
|
]
|
2024-10-28 08:01:52 +00:00
|
|
|
|
demo = [
|
|
|
|
|
"faker",
|
|
|
|
|
"honcho",
|
|
|
|
|
"slapd",
|
|
|
|
|
"requests",
|
|
|
|
|
"watchdog >= 4.0.0",
|
2023-08-16 15:14:11 +00:00
|
|
|
|
]
|
2023-03-11 23:13:09 +00:00
|
|
|
|
|
2024-10-28 08:01:52 +00:00
|
|
|
|
[project.scripts]
|
2022-08-09 13:54:01 +00:00
|
|
|
|
canaille = "canaille.commands:cli"
|
2022-05-13 09:44:23 +00:00
|
|
|
|
|
|
|
|
|
[options.packages.find]
|
|
|
|
|
exclude = [
|
|
|
|
|
"tests",
|
|
|
|
|
"tests.*",
|
|
|
|
|
"doc",
|
|
|
|
|
"doc.*",
|
|
|
|
|
]
|
|
|
|
|
|
2024-10-28 08:01:52 +00:00
|
|
|
|
[tool.hatch.build]
|
|
|
|
|
include = [
|
|
|
|
|
"canaille/",
|
|
|
|
|
"doc/",
|
|
|
|
|
"tests/",
|
|
|
|
|
"CHANGES.rst",
|
|
|
|
|
"CONTRIBUTING.rst",
|
|
|
|
|
"README.md",
|
|
|
|
|
]
|
|
|
|
|
exclude = [
|
|
|
|
|
"docs/_build/",
|
|
|
|
|
]
|
|
|
|
|
artifacts = ["canaille/translations/*/LC_MESSAGES/*.mo"]
|
|
|
|
|
|
|
|
|
|
[tool.hatch.build.hooks.custom]
|
|
|
|
|
dependencies = [
|
|
|
|
|
"Babel>=2.6.0",
|
2024-10-31 18:24:13 +00:00
|
|
|
|
"setuptools >= 50.0.0; python_version>='3.12'",
|
2024-10-28 08:01:52 +00:00
|
|
|
|
]
|
2022-05-14 21:58:26 +00:00
|
|
|
|
|
2022-05-13 09:44:23 +00:00
|
|
|
|
[tool.coverage.run]
|
|
|
|
|
source = [
|
|
|
|
|
"canaille",
|
|
|
|
|
"tests",
|
|
|
|
|
]
|
|
|
|
|
omit = [".tox/*"]
|
2022-12-22 16:14:46 +00:00
|
|
|
|
branch = true
|
2022-05-13 09:44:23 +00:00
|
|
|
|
|
2023-09-01 08:46:56 +00:00
|
|
|
|
[tool.coverage.report]
|
|
|
|
|
exclude_lines = [
|
2024-03-29 16:44:42 +00:00
|
|
|
|
"@pytest.mark.skip",
|
2023-09-01 08:46:56 +00:00
|
|
|
|
"pragma: no cover",
|
|
|
|
|
"raise NotImplementedError",
|
|
|
|
|
"except ImportError",
|
|
|
|
|
"if app.debug",
|
|
|
|
|
]
|
|
|
|
|
|
2024-03-15 18:58:06 +00:00
|
|
|
|
[tool.ruff.lint]
|
2024-04-23 20:12:04 +00:00
|
|
|
|
select = [
|
2024-11-07 10:40:52 +00:00
|
|
|
|
"B", # flake8-bugbear
|
2024-04-23 20:12:04 +00:00
|
|
|
|
"E", # pycodestyle
|
|
|
|
|
"F", # pyflakes
|
|
|
|
|
"I", # isort
|
|
|
|
|
"UP", # pyupgrade
|
|
|
|
|
]
|
|
|
|
|
ignore = [
|
|
|
|
|
"E501", # line-too-long
|
|
|
|
|
"E722", # bare-except
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[tool.ruff.lint.isort]
|
|
|
|
|
force-single-line = true
|
|
|
|
|
|
2024-09-11 07:25:07 +00:00
|
|
|
|
[tool.ruff.format]
|
2024-04-23 20:12:04 +00:00
|
|
|
|
docstring-code-format = true
|
2023-05-25 11:37:58 +00:00
|
|
|
|
|
2022-05-13 09:44:23 +00:00
|
|
|
|
[tool.tox]
|
2024-10-28 08:01:52 +00:00
|
|
|
|
requires = ["tox>=4.19"]
|
|
|
|
|
env_list = [
|
|
|
|
|
"style",
|
|
|
|
|
"py310",
|
|
|
|
|
"py311",
|
|
|
|
|
"py312",
|
|
|
|
|
"py313",
|
|
|
|
|
"minversions",
|
|
|
|
|
"doc",
|
|
|
|
|
"coverage",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[tool.tox.env_run_base]
|
2024-11-01 13:18:10 +00:00
|
|
|
|
runner = "uv-venv-lock-runner"
|
2024-11-02 15:55:32 +00:00
|
|
|
|
dependency_groups = ["dev"]
|
2024-11-13 09:18:04 +00:00
|
|
|
|
uv_sync_flags = ["--extra", "front", "--extra", "oidc", "--extra", "sqlite", "--extra", "ldap"]
|
2024-10-28 08:01:52 +00:00
|
|
|
|
commands = [
|
|
|
|
|
["pytest", "--showlocals", "--full-trace", "{posargs}"],
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[tool.tox.env.style]
|
2024-11-01 13:18:10 +00:00
|
|
|
|
skip_install = true
|
|
|
|
|
runner = "uv-venv-runner"
|
2024-10-28 08:01:52 +00:00
|
|
|
|
commands = [
|
|
|
|
|
["pre-commit", "run", "--all-files", "--show-diff-on-failure"],
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[tool.tox.env.minversions]
|
|
|
|
|
uv_resolution = "lowest-direct"
|
2024-10-31 18:44:41 +00:00
|
|
|
|
basepython = ["python3.10"]
|
2024-10-28 08:01:52 +00:00
|
|
|
|
|
|
|
|
|
[tool.tox.env.doc]
|
|
|
|
|
dependency_groups = ["doc"]
|
|
|
|
|
commands = [
|
2024-12-05 10:03:26 +00:00
|
|
|
|
["sphinx-build", "--builder", "html", "--fail-on-warning", "doc", "build/sphinx/html"],
|
2024-10-28 08:01:52 +00:00
|
|
|
|
["sphinx-build", "--builder", "man", "doc", "build/sphinx/html"],
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[tool.tox.env.coverage]
|
|
|
|
|
commands = [
|
|
|
|
|
["pytest", "--cov", "--cov-fail-under=100", "--cov-report", "term:skip-covered", "{posargs}"],
|
|
|
|
|
["coverage", "html"],
|
|
|
|
|
]
|
2024-09-12 17:29:59 +00:00
|
|
|
|
|
|
|
|
|
[[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"
|