mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-04 03:53:56 +00:00
492969e370
Some tests fail due hypothesis healthchecks, that complains about a temporary directory not being cleaned between tests. This is due to the hypothesis 6.x upgrade, while the library pins 2.0.0 from 2016.
53 lines
1.3 KiB
Nix
53 lines
1.3 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, cython
|
|
, pytestrunner
|
|
, pytestCheckHook
|
|
, hypothesis
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "marisa-trie";
|
|
version = "0.7.5";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "c73bc25d868e8c4ea7aa7f1e19892db07bba2463351269b05340ccfa06eb2baf";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace "hypothesis==" "hypothesis>="
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
cython
|
|
pytestrunner
|
|
];
|
|
|
|
preBuild = ''
|
|
./update_cpp.sh
|
|
'';
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
hypothesis
|
|
];
|
|
|
|
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"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Static memory-efficient Trie-like structures for Python (2.x and 3.x) 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";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ ixxie ];
|
|
};
|
|
}
|