2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytestCheckHook,
|
|
|
|
pyyaml,
|
|
|
|
}:
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-i18n";
|
|
|
|
version = "0.3.9";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "danhper";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "python-i18n";
|
2022-02-10 20:34:41 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "6FahoHZqaOWYGaT9RqLARCm2kLfUIlYuauB6+0eX7jA=";
|
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
# Replace use of deprecated assertRaisesRegexp
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace i18n/tests/loader_tests.py \
|
|
|
|
--replace-fail assertRaisesRegexp assertRaisesRegex
|
|
|
|
'';
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pyyaml
|
|
|
|
];
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestFlagsArray = [ "i18n/tests/run_tests.py" ];
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "i18n" ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Easy to use i18n library";
|
|
|
|
homepage = "https://github.com/danhper/python-i18n";
|
|
|
|
license = with licenses; [ mit ];
|
2022-02-20 05:27:41 +00:00
|
|
|
maintainers = with maintainers; [ emilytrau ];
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
}
|