120 lines
3.9 KiB
TOML
120 lines
3.9 KiB
TOML
[build-system]
|
|
requires = [
|
|
"setuptools>=45",
|
|
"setuptools_scm[toml]>=6.2",
|
|
"cffi>=1.0.1",
|
|
]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
|
|
[project]
|
|
dynamic = ["version"]
|
|
name = "argon2-cffi-bindings"
|
|
description = "Low-level CFFI bindings for Argon2"
|
|
readme = { content-type = "text/markdown", file = "README.md" }
|
|
authors = [{ name = "Hynek Schlawack", email = "hs@ox.cx" }]
|
|
requires-python = ">=3.9"
|
|
# Setuptools doesn't support PEP 639, yet.
|
|
license = { text = "MIT" }
|
|
keywords = ["password", "hash", "hashing", "security", "bindings", "cffi"]
|
|
classifiers = [
|
|
"Development Status :: 5 - Production/Stable",
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: MIT License",
|
|
"Natural Language :: English",
|
|
"Operating System :: MacOS :: MacOS X",
|
|
"Operating System :: Microsoft :: Windows",
|
|
"Operating System :: POSIX",
|
|
"Operating System :: Unix",
|
|
"Programming Language :: Python :: 3.9",
|
|
"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",
|
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
"Topic :: Security :: Cryptography",
|
|
"Topic :: Security",
|
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
]
|
|
dependencies = ["cffi>=1.0.1"]
|
|
|
|
[project.optional-dependencies]
|
|
tests = ["pytest"]
|
|
dev = ["argon2-cffi-bindings[tests]", "cogapp", "pre-commit", "wheel"]
|
|
|
|
[project.urls]
|
|
Tidelift = "https://tidelift.com/subscription/pkg/pypi-argon2-cffi?utm_source=pypi-argon2-cffi&utm_medium=pypi"
|
|
"Changelog" = "https://github.com/hynek/argon2-cffi-bindings/blob/main/CHANGELOG.md"
|
|
"Source Code" = "https://github.com/hynek/argon2-cffi-bindings"
|
|
"Funding" = "https://github.com/sponsors/hynek"
|
|
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["src"]
|
|
|
|
|
|
[tool.setuptools_scm]
|
|
# Dev versions are PREVIOUS.devN with N being the # of commits since PREVIOUS.
|
|
local_scheme = "no-local-version"
|
|
|
|
|
|
[tool.pytest.ini_options]
|
|
addopts = ["-ra", "--strict-markers", "--strict-config", "--capture=no"]
|
|
xfail_strict = true
|
|
testpaths = "tests"
|
|
filterwarnings = ["once::Warning"]
|
|
|
|
|
|
[tool.interrogate]
|
|
omit-covered-files = true
|
|
verbose = 2
|
|
fail-under = 100
|
|
whitelist-regex = ["test_.*"]
|
|
|
|
|
|
[tool.ruff]
|
|
src = ["src", "tests"]
|
|
line-length = 79
|
|
|
|
[tool.ruff.lint]
|
|
select = ["ALL"]
|
|
ignore = [
|
|
"A001", # shadowing is fine
|
|
"A002", # shadowing is fine
|
|
"A003", # shadowing is fine
|
|
"ANN", # Mypy is better at this
|
|
"ARG001", # unused arguments are normal when implementing interfaces
|
|
"COM", # Formatter takes care of our commas
|
|
"D", # We prefer our own docstring style.
|
|
"E501", # leave line-length enforcement to formatter
|
|
"ERA001", # Dead code detection is overly eager.
|
|
"FBT", # we have one function that takes one bool; c'mon!
|
|
"FIX", # Yes, we want XXX as a marker.
|
|
"INP001", # sometimes we want Python files outside of packages
|
|
"ISC001", # conflicts with ruff format
|
|
"PLR0913", # yes, many arguments, but most have defaults
|
|
"PLR2004", # numbers are sometimes fine
|
|
"PLW2901", # re-assigning within loop bodies is fine
|
|
"RUF001", # leave my smart characters alone
|
|
"SLF001", # private members are accessed by friendly functions
|
|
"TCH", # TYPE_CHECKING blocks break autodocs
|
|
"TD", # we don't follow other people's todo style
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"src/argon2/__main__.py" = ["T201"] # need print in CLI
|
|
"tests/*" = [
|
|
"ARG", # stubs don't care about arguments
|
|
"S101", # assert
|
|
"SIM300", # Yoda rocks in asserts
|
|
"PT005", # we always add underscores and explicit name
|
|
"PT011", # broad is fine
|
|
"TRY002", # stock exceptions are fine in tests
|
|
"EM101", # no need for exception msg hygiene in tests
|
|
]
|
|
|
|
[tool.ruff.lint.isort]
|
|
lines-between-types = 1
|
|
lines-after-imports = 2
|