1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pyyaml,
7}:
8
9buildPythonPackage rec {
10 pname = "python-i18n";
11 version = "0.3.9";
12 format = "setuptools";
13
14 src = fetchFromGitHub {
15 owner = "danhper";
16 repo = "python-i18n";
17 rev = "v${version}";
18 sha256 = "6FahoHZqaOWYGaT9RqLARCm2kLfUIlYuauB6+0eX7jA=";
19 };
20
21 # Replace use of deprecated assertRaisesRegexp
22 postPatch = ''
23 substituteInPlace i18n/tests/loader_tests.py \
24 --replace-fail assertRaisesRegexp assertRaisesRegex
25 '';
26
27 nativeCheckInputs = [
28 pytestCheckHook
29 pyyaml
30 ];
31 enabledTestPaths = [ "i18n/tests/run_tests.py" ];
32 pythonImportsCheck = [ "i18n" ];
33
34 meta = with lib; {
35 description = "Easy to use i18n library";
36 homepage = "https://github.com/danhper/python-i18n";
37 license = with licenses; [ mit ];
38 maintainers = with maintainers; [ emilytrau ];
39 };
40}