2023-03-27 19:17:25 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-07-15 17:15:38 +00:00
|
|
|
, isPyPy
|
2023-03-27 19:17:25 +00:00
|
|
|
, pythonAtLeast
|
|
|
|
, pythonOlder
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
, setuptools
|
2023-03-27 19:17:25 +00:00
|
|
|
|
|
|
|
# tests
|
|
|
|
, freezegun
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytz
|
2024-01-13 08:15:51 +00:00
|
|
|
, tzdata
|
2023-03-27 19:17:25 +00:00
|
|
|
}:
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "babel";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "2.14.0";
|
|
|
|
pyproject = true;
|
2023-03-27 19:17:25 +00:00
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "Babel";
|
|
|
|
inherit version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-aRmGfbA2OYuiHrXHoPayirjLw656c6ROvjSudKTn02M=";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [
|
|
|
|
pytz
|
|
|
|
];
|
|
|
|
|
|
|
|
# including backports.zoneinfo for python<3.9 yields infinite recursion
|
|
|
|
doCheck = pythonAtLeast "3.9";
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
freezegun
|
|
|
|
pytestCheckHook
|
2023-07-15 17:15:38 +00:00
|
|
|
# https://github.com/python-babel/babel/issues/988#issuecomment-1521765563
|
2023-03-27 19:17:25 +00:00
|
|
|
pytz
|
2023-07-15 17:15:38 +00:00
|
|
|
] ++ lib.optionals isPyPy [
|
|
|
|
tzdata
|
2023-03-27 19:17:25 +00:00
|
|
|
];
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
disabledTests = [
|
|
|
|
# fails on days switching from and to daylight saving time in EST
|
|
|
|
# https://github.com/python-babel/babel/issues/988
|
|
|
|
"test_format_time"
|
|
|
|
];
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://babel.pocoo.org/";
|
2023-03-27 19:17:25 +00:00
|
|
|
changelog = "https://github.com/python-babel/babel/releases/tag/v${version}";
|
2022-05-18 14:49:53 +00:00
|
|
|
description = "Collection of internationalizing tools";
|
|
|
|
license = licenses.bsd3;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
}
|