depot/pkgs/development/python-modules/wtforms/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

61 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
# build-system
babel,
hatchling,
setuptools,
# dependencies
markupsafe,
# optional-dependencies
email-validator,
# tests
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "wtforms";
version = "3.1.2";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "wtforms";
repo = "wtforms";
rev = "refs/tags/${version}";
hash = "sha256-L6DmB7iVpJR775oRxuEkCKWlUJnmw8VPZTr2dZbqeEc=";
};
nativeBuildInputs = [
babel
hatchling
setuptools
];
propagatedBuildInputs = [ markupsafe ];
optional-dependencies = {
email = [ email-validator ];
};
nativeCheckInputs = [
pytestCheckHook
] ++ lib.flatten (lib.attrValues optional-dependencies);
pythonImportsCheck = [ "wtforms" ];
meta = with lib; {
description = "Flexible forms validation and rendering library for Python";
homepage = "https://github.com/wtforms/wtforms";
changelog = "https://github.com/wtforms/wtforms/blob/${version}/CHANGES.rst";
license = licenses.bsd3;
maintainers = with maintainers; [ bhipple ];
};
}