1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 regex, 6 pytestCheckHook, 7 pythonOlder, 8}: 9 10buildPythonPackage rec { 11 pname = "parsimonious"; 12 version = "0.10.0"; 13 format = "setuptools"; 14 15 disabled = pythonOlder "3.7"; 16 17 src = fetchPypi { 18 inherit pname version; 19 hash = "sha256-goFgDaGA7IrjVCekq097gr/sHj0eUvgMtg6oK5USUBw="; 20 }; 21 22 propagatedBuildInputs = [ regex ]; 23 24 nativeCheckInputs = [ pytestCheckHook ]; 25 26 disabledTests = [ 27 # test_benchmarks.py tests are actually benchmarks and may fail due to 28 # something being unexpectedly slow on a heavily loaded build machine 29 "test_lists_vs_dicts" 30 "test_call_vs_inline" 31 "test_startswith_vs_regex" 32 ]; 33 34 postPatch = '' 35 substituteInPlace setup.py \ 36 --replace "regex>=2022.3.15" "regex" 37 ''; 38 39 pythonImportsCheck = [ 40 "parsimonious" 41 "parsimonious.grammar" 42 "parsimonious.nodes" 43 ]; 44 45 meta = with lib; { 46 description = "Arbitrary-lookahead parser"; 47 homepage = "https://github.com/erikrose/parsimonious"; 48 license = licenses.mit; 49 maintainers = [ ]; 50 }; 51}