at 24.05-pre 1.2 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, isPyPy 5, pythonAtLeast 6, pythonOlder 7, tzdata 8 9# tests 10, freezegun 11, pytestCheckHook 12, pytz 13}: 14 15buildPythonPackage rec { 16 pname = "babel"; 17 version = "2.12.1"; 18 format = "setuptools"; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchPypi { 23 pname = "Babel"; 24 inherit version; 25 hash = "sha256-zC2ZmZzQHURCCuclohyeNxGzqtx5dtYUf2IthYGWNFU="; 26 }; 27 28 propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [ 29 pytz 30 ]; 31 32 # including backports.zoneinfo for python<3.9 yields infinite recursion 33 doCheck = pythonAtLeast "3.9"; 34 35 nativeCheckInputs = [ 36 freezegun 37 pytestCheckHook 38 # https://github.com/python-babel/babel/issues/988#issuecomment-1521765563 39 pytz 40 ] ++ lib.optionals isPyPy [ 41 tzdata 42 ]; 43 44 disabledTests = [ 45 # fails on days switching from and to daylight saving time in EST 46 # https://github.com/python-babel/babel/issues/988 47 "test_format_time" 48 ]; 49 50 meta = with lib; { 51 homepage = "https://babel.pocoo.org/"; 52 changelog = "https://github.com/python-babel/babel/releases/tag/v${version}"; 53 description = "Collection of internationalizing tools"; 54 license = licenses.bsd3; 55 maintainers = with maintainers; [ ]; 56 }; 57}