2020-04-24 23:36:52 +00:00
{ lib
, buildPythonPackage
, fetchPypi
2021-03-12 07:09:13 +00:00
, cython
2021-07-24 12:14:16 +00:00
, pytest-runner
2021-06-28 23:13:55 +00:00
, pytestCheckHook
2020-04-24 23:36:52 +00:00
, hypothesis
} :
buildPythonPackage rec {
pname = " m a r i s a - t r i e " ;
version = " 0 . 7 . 5 " ;
src = fetchPypi {
inherit pname version ;
sha256 = " c 7 3 b c 2 5 d 8 6 8 e 8 c 4 e a 7 a a 7 f 1 e 1 9 8 9 2 d b 0 7 b b a 2 4 6 3 3 5 1 2 6 9 b 0 5 3 4 0 c c f a 0 6 e b 2 b a f " ;
} ;
postPatch = ''
substituteInPlace setup . py \
- - replace " h y p o t h e s i s = = " " h y p o t h e s i s > = "
'' ;
2021-06-28 23:13:55 +00:00
nativeBuildInputs = [
cython
2021-07-24 12:14:16 +00:00
pytest-runner
2021-06-28 23:13:55 +00:00
] ;
2021-03-12 07:09:13 +00:00
preBuild = ''
./update_cpp.sh
'' ;
2020-04-24 23:36:52 +00:00
2021-06-28 23:13:55 +00:00
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(...)`.
" t e s t _ s a v e l o a d "
" t e s t _ m m a p "
] ;
2020-04-24 23:36:52 +00:00
meta = with lib ; {
description = " S t a t i c m e m o r y - e f f i c i e n t T r i e - l i k e s t r u c t u r e s f o r P y t h o n ( 2 . x a n d 3 . x ) b a s e d o n m a r i s a - t r i e C + + l i b r a r y " ;
longDescription = " T h e r e a r e o f f i c i a l S W I G - b a s e d P y t h o n b i n d i n g s i n c l u d e d i n C + + l i b r a r y d i s t r i b u t i o n ; t h i s p a c k a g e p r o v i d e s a l t e r n a t i v e C y t h o n - b a s e d p i p - i n s t a l l a b l e P y t h o n b i n d i n g s . " ;
homepage = " h t t p s : / / g i t h u b . c o m / k m i k e / m a r i s a - t r i e " ;
license = licenses . mit ;
maintainers = with maintainers ; [ ixxie ] ;
} ;
}