1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 cython, 7 pytestCheckHook, 8 pythonOlder, 9}: 10 11buildPythonPackage rec { 12 pname = "cymem"; 13 version = "2.0.11"; 14 pyproject = true; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "explosion"; 20 repo = "cymem"; 21 tag = "release-v${version}"; 22 hash = "sha256-4srwdQS06KeBAIaJm6XxmsHEZto0eiXBznrCHgT/BAc="; 23 }; 24 25 build-system = [ 26 setuptools 27 cython 28 ]; 29 30 nativeCheckInputs = [ pytestCheckHook ]; 31 32 preCheck = '' 33 # remove src module, so tests use the installed module instead 34 mv ./cymem/tests ./tests 35 rm -r ./cymem 36 ''; 37 38 pythonImportsCheck = [ "cymem" ]; 39 40 meta = with lib; { 41 description = "Cython memory pool for RAII-style memory management"; 42 homepage = "https://github.com/explosion/cymem"; 43 changelog = "https://github.com/explosion/cymem/releases/tag/release-${src.tag}"; 44 license = licenses.mit; 45 maintainers = with maintainers; [ nickcao ]; 46 }; 47}