1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 rapidjson, 7 pytestCheckHook, 8 pytz, 9 setuptools, 10 replaceVars, 11}: 12 13buildPythonPackage rec { 14 version = "1.20"; 15 pname = "python-rapidjson"; 16 disabled = pythonOlder "3.8"; 17 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "python-rapidjson"; 22 repo = "python-rapidjson"; 23 tag = "v${version}"; 24 hash = "sha256-xIswmHQMl5pAqvcTNqeuO3P6MynKt3ahzUgGQroaqmw="; 25 }; 26 27 patches = [ 28 (replaceVars ./rapidjson-include-dir.patch { 29 rapidjson = lib.getDev rapidjson; 30 }) 31 ]; 32 33 build-system = [ setuptools ]; 34 35 nativeCheckInputs = [ 36 pytestCheckHook 37 pytz 38 ]; 39 40 disabledTestPaths = [ "benchmarks" ]; 41 42 meta = with lib; { 43 changelog = "https://github.com/python-rapidjson/python-rapidjson/blob/${src.rev}/CHANGES.rst"; 44 homepage = "https://github.com/python-rapidjson/python-rapidjson"; 45 description = "Python wrapper around rapidjson"; 46 license = licenses.mit; 47 maintainers = with maintainers; [ dotlambda ]; 48 }; 49}