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.17.0";
21 pyproject = true;
22
23 disabled = pythonOlder "3.7";
24
25 src = fetchPypi {
26 inherit pname version;
27 hash = "sha256-DFTP+xn2kM3MUqO1C8v3HgeoCNHIDVSfJFm50s8K+50=";
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 ]
38 ++ lib.optionals isPyPy [ tzdata ];
39
40 disabledTests = [
41 # fails on days switching from and to daylight saving time in EST
42 # https://github.com/python-babel/babel/issues/988
43 "test_format_time"
44 ];
45
46 pythonImportsCheck = [ "babel" ];
47
48 meta = {
49 description = "Collection of internationalizing tools";
50 homepage = "https://babel.pocoo.org/";
51 changelog = "https://github.com/python-babel/babel/releases/tag/v${version}";
52 license = lib.licenses.bsd3;
53 maintainers = with lib.maintainers; [ getchoo ];
54 mainProgram = "pybabel";
55 };
56}