2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2024-01-13 08:15:51 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
|
|
|
|
# build-system
|
2022-05-18 14:49:53 +00:00
|
|
|
, babel
|
2024-01-13 08:15:51 +00:00
|
|
|
, hatchling
|
|
|
|
, setuptools
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
, markupsafe
|
|
|
|
|
|
|
|
# optional-dependencies
|
2022-06-26 10:26:21 +00:00
|
|
|
, email-validator
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# tests
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-06-16 17:23:12 +00:00
|
|
|
pname = "wtforms";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "3.1.1";
|
|
|
|
pyproject = true;
|
2023-02-22 10:55:15 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wtforms";
|
|
|
|
repo = "wtforms";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-9EryEXGlGCtDH/XPM4Oihla42HnY0nho9DaauHfYnNQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
babel
|
|
|
|
hatchling
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
markupsafe
|
|
|
|
];
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
email = [
|
|
|
|
email-validator
|
|
|
|
];
|
|
|
|
};
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-19 23:45:15 +00:00
|
|
|
pytestCheckHook
|
2024-01-13 08:15:51 +00:00
|
|
|
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"wtforms"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A flexible forms validation and rendering library for Python";
|
2020-06-18 07:06:33 +00:00
|
|
|
homepage = "https://github.com/wtforms/wtforms";
|
|
|
|
changelog = "https://github.com/wtforms/wtforms/blob/${version}/CHANGES.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2023-02-22 10:55:15 +00:00
|
|
|
maintainers = with maintainers; [ bhipple ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|