1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 isPyPy,
6 pythonOlder,
7
8 # build-system
9 setuptools,
10
11 # tests
12 freezegun,
13 pytestCheckHook,
14 pytz,
15 tzdata,
16}:
17
18buildPythonPackage rec {
19 pname = "babel";
20 version = "2.15.0";
21 pyproject = true;
22
23 disabled = pythonOlder "3.7";
24
25 src = fetchPypi {
26 inherit pname version;
27 hash = "sha256-ja8OJl0FdovGx6MUzxMh6aEjr8MozGNcGGIqLzCgRBM=";
28 };
29
30 build-system = [ setuptools ];
31
32 nativeCheckInputs = [
33 freezegun
34 pytestCheckHook
35 # https://github.com/python-babel/babel/issues/988#issuecomment-1521765563
36 pytz
37 ] ++ lib.optionals isPyPy [ tzdata ];
38
39 disabledTests = [
40 # fails on days switching from and to daylight saving time in EST
41 # https://github.com/python-babel/babel/issues/988
42 "test_format_time"
43 ];
44
45 pythonImportsCheck = [ "babel" ];
46
47 meta = {
48 description = "Collection of internationalizing tools";
49 homepage = "https://babel.pocoo.org/";
50 changelog = "https://github.com/python-babel/babel/releases/tag/v${version}";
51 license = lib.licenses.bsd3;
52 maintainers = with lib.maintainers; [ getchoo ];
53 mainProgram = "pybabel";
54 };
55}