1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
{
stdenv,
lib,
buildPythonPackage,
fetchFromGitLab,
pkg-config,
setuptools,
pytestCheckHook,
six,
icu,
}:
buildPythonPackage rec {
pname = "pyicu";
version = "2.15";
pyproject = true;
src = fetchFromGitLab {
domain = "gitlab.pyicu.org";
owner = "main";
repo = "pyicu";
tag = "v${version}";
hash = "sha256-F3qW0yZBjJ8pmLEW4dWKBFvnyiw5F732DKAI+eLcL+g=";
};
postPatch = ''
substituteInPlace setup.py --replace-fail "'pkg-config'" "'${stdenv.cc.targetPrefix}pkg-config'"
'';
build-system = [ setuptools ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ icu ];
nativeCheckInputs = [
pytestCheckHook
six
];
pytestFlagsArray = [
# AssertionError: '$' != 'US Dollar'
"--deselect=test/test_NumberFormatter.py::TestCurrencyUnit::testGetName"
# AssertionError: Lists differ: ['a', 'b', 'c', 'd'] != ['a', 'b', 'c', 'd', ...
"--deselect=test/test_UnicodeSet.py::TestUnicodeSet::testIterators"
];
pythonImportsCheck = [ "icu" ];
meta = with lib; {
homepage = "https://gitlab.pyicu.org/main/pyicu";
description = "Python extension wrapping the ICU C++ API";
changelog = "https://gitlab.pyicu.org/main/pyicu/-/raw/v${version}/CHANGES";
license = licenses.mit;
};
}
|