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