1{ lib 2, buildPythonPackage 3, fetchpatch 4, fetchPypi 5, freezegun 6, numpy 7, py 8, pytestCheckHook 9, pythonAtLeast 10, pythonOlder 11}: 12 13buildPythonPackage rec { 14 pname = "pypytools"; 15 version = "0.6.2"; 16 format = "setuptools"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchPypi { 21 inherit pname version; 22 hash = "sha256-oUDAU+TRwLroNfQGYusAQKdRkHcazysqiDLfp77v5Sk="; 23 }; 24 25 propagatedBuildInputs = [ 26 py 27 ]; 28 29 nativeCheckInputs = [ 30 freezegun 31 numpy 32 py 33 pytestCheckHook 34 ]; 35 36 patches = [ 37 # Support for later Python releases, https://github.com/antocuni/pypytools/pull/2 38 (fetchpatch { 39 name = "support-later-python.patch"; 40 url = "https://github.com/antocuni/pypytools/commit/c6aed496ec35a6ef7ce9e95084849eebc16bafef.patch"; 41 hash = "sha256-YoYRZmgueQmxRtGaeP4zEVxuA0U7TB0PmoYHHVI7ICQ="; 42 }) 43 ]; 44 45 pythonImportsCheck = [ 46 "pypytools" 47 ]; 48 49 disabledTests = lib.optionals (pythonAtLeast "3.11") [ 50 # https://github.com/antocuni/pypytools/issues/4 51 "test_clonefunc" 52 ]; 53 54 meta = with lib; { 55 description = "Collection of tools to use PyPy-specific features"; 56 homepage = "https://github.com/antocuni/pypytools"; 57 license = licenses.mit; 58 maintainers = with maintainers; [ fab ]; 59 }; 60}