lol

python310Packages.babel: Fix tests, disable tests

Some tests required pytz, some tests are just broken two times a year
on days when EST is moving from and to daylight saving time.

Now with that out of the way, some general goodness towards the package.

+32 -3
+32 -3
pkgs/development/python-modules/babel/default.nix
··· 1 - { stdenv, lib, buildPythonPackage, fetchPypi, pythonOlder, pytz, pytestCheckHook, freezegun }: 1 + { lib 2 + , buildPythonPackage 3 + , fetchPypi 4 + , pythonOlder 5 + 6 + # tests 7 + , backports-zoneinfo 8 + , freezegun 9 + , pytestCheckHook 10 + , pytz 11 + }: 2 12 3 13 buildPythonPackage rec { 4 14 pname = "babel"; 5 15 version = "2.12.1"; 16 + format = "setuptools"; 17 + 6 18 disabled = pythonOlder "3.7"; 7 19 8 20 src = fetchPypi { ··· 11 23 hash = "sha256-zC2ZmZzQHURCCuclohyeNxGzqtx5dtYUf2IthYGWNFU="; 12 24 }; 13 25 14 - propagatedBuildInputs = lib.optional (pythonOlder "3.9") pytz; 26 + propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [ 27 + pytz 28 + ]; 29 + 30 + nativeCheckInputs = [ 31 + # via setup.py 32 + freezegun 33 + pytestCheckHook 34 + # via tox.ini 35 + pytz 36 + ] ++ lib.optionals (pythonOlder "3.9") [ 37 + backports-zoneinfo 38 + ]; 15 39 16 - nativeCheckInputs = [ pytestCheckHook freezegun ]; 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 + ]; 17 45 18 46 meta = with lib; { 19 47 homepage = "https://babel.pocoo.org/"; 48 + changelog = "https://github.com/python-babel/babel/releases/tag/v${version}"; 20 49 description = "Collection of internationalizing tools"; 21 50 license = licenses.bsd3; 22 51 maintainers = with maintainers; [ SuperSandro2000 ];