1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6
7 # build-system
8 poetry-core,
9
10 # docs
11 furo,
12 sphinxHook,
13
14 # runtime
15 babel,
16 flask,
17 jinja2,
18 pytz,
19
20 # tests
21 pytest-mock,
22 pytestCheckHook,
23}:
24
25buildPythonPackage rec {
26 pname = "flask-babel";
27 version = "4.0.0";
28 format = "pyproject";
29
30 src = fetchFromGitHub {
31 owner = "python-babel";
32 repo = "flask-babel";
33 rev = "refs/tags/v${version}";
34 hash = "sha256-BAT+oupy4MCSjeZ4hFtSKMkGU9xZtc7Phnz1mIsb2Kc=";
35 };
36
37 outputs = [
38 "out"
39 "doc"
40 ];
41
42 nativeBuildInputs = [
43 furo
44 poetry-core
45 sphinxHook
46 ];
47
48 propagatedBuildInputs = [
49 babel
50 flask
51 jinja2
52 pytz
53 ];
54
55 pythonImportsCheck = [ "flask_babel" ];
56
57 checkInputs = [
58 pytest-mock
59 pytestCheckHook
60 ];
61
62 meta = with lib; {
63 changelog = "https://github.com/python-babel/flask-babel/releases/tag/v${version}";
64 description = "Adds i18n/l10n support to Flask applications";
65 longDescription = ''
66 Implements i18n and l10n support for Flask.
67 This is based on the Python babel module as well as pytz both of which are
68 installed automatically for you if you install this library.
69 '';
70 license = licenses.bsd2;
71 maintainers = teams.sage.members ++ (with maintainers; [ matejc ]);
72 homepage = "https://github.com/python-babel/flask-babel";
73 };
74}