1{ lib
2, buildPythonPackage
3, fetchPypi
4, markupsafe
5, babel
6, pytestCheckHook
7, email-validator
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "wtforms";
13 version = "3.0.1";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 pname = "WTForms";
20 inherit version;
21 hash = "sha256-azUbuxLdWK9X/+8FvHhCXQjRkU4P1o7hQUO3reAjxbw=";
22 };
23
24 propagatedBuildInputs = [
25 markupsafe
26 babel
27 ];
28
29 passthru.optional-dependencies = {
30 email = [
31 email-validator
32 ];
33 };
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
38
39 pythonImportsCheck = [
40 "wtforms"
41 ];
42
43 meta = with lib; {
44 description = "A flexible forms validation and rendering library for Python";
45 homepage = "https://github.com/wtforms/wtforms";
46 changelog = "https://github.com/wtforms/wtforms/blob/${version}/CHANGES.rst";
47 license = licenses.bsd3;
48 maintainers = with maintainers; [ bhipple ];
49 };
50
51}