blob: 8001af18c0ff264a96eb3a06ffb1190c7903306f (
plain) (
blame)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
{
lib,
buildPythonPackage,
fetchPypi,
cython,
setuptools,
pytestCheckHook,
hypothesis,
readme-renderer,
pythonOlder,
}:
buildPythonPackage rec {
pname = "marisa-trie";
version = "1.2.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
pname = "marisa_trie";
inherit version;
hash = "sha256-/t/GdJf4qidXdWtc9JN1nyRdMh+3iRTOElttddqom18=";
};
build-system = [
cython
setuptools
];
nativeCheckInputs = [
pytestCheckHook
readme-renderer
hypothesis
];
postPatch = ''
substituteInPlace setup.py \
--replace "hypothesis==" "hypothesis>="
'';
preBuild = ''
./update_cpp.sh
'';
disabledTestPaths = [
# Don't test packaging
"tests/test_packaging.py"
];
disabledTests = [
# Pins hypothesis==2.0.0 from 2016/01 which complains about
# hypothesis.errors.FailedHealthCheck: tests/test_trie.py::[...] uses
# the 'tmpdir' fixture, which is reset between function calls but not
# between test cases generated by `@given(...)`.
"test_saveload"
"test_mmap"
];
pythonImportsCheck = [ "marisa_trie" ];
meta = with lib; {
description = "Static memory-efficient Trie-like structures for Python based on marisa-trie C++ library";
longDescription = ''
There are official SWIG-based Python bindings included in C++ library distribution.
This package provides alternative Cython-based pip-installable Python bindings.
'';
homepage = "https://github.com/kmike/marisa-trie";
changelog = "https://github.com/pytries/marisa-trie/blob/${version}/CHANGES.rst";
license = licenses.mit;
};
}
|