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 " ;
2021-09-18 10:52:07 +00:00
version = " 0 . 7 . 7 " ;
2020-04-24 23:36:52 +00:00
src = fetchPypi {
inherit pname version ;
2021-09-18 10:52:07 +00:00
sha256 = " b b e a f b 7 d 9 2 8 3 9 d c 2 2 1 3 6 5 3 4 0 e 7 9 d 0 1 2 c b 5 0 e e 4 8 a 1 f 3 f 3 0 d d 9 1 6 e b 3 5 a 8 b 9 3 d b 0 0 " ;
2020-04-24 23:36:52 +00:00
} ;
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 ] ;
} ;
}