at master 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 hatch-vcs, 6 hatchling, 7 numpy, 8 pytest-xdist, 9 pytestCheckHook, 10 pythonOlder, 11}: 12 13buildPythonPackage rec { 14 pname = "pyhamcrest"; 15 version = "2.1.0"; 16 format = "pyproject"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "hamcrest"; 22 repo = "PyHamcrest"; 23 tag = "V${version}"; 24 hash = "sha256-VkfHRo4k8g9/QYG4r79fXf1NXorVdpUKUgVrbV2ELMU="; 25 }; 26 27 postPatch = '' 28 substituteInPlace pyproject.toml \ 29 --replace 'dynamic = ["version"]' 'version = "${version}"' 30 ''; 31 32 nativeBuildInputs = [ 33 hatch-vcs 34 hatchling 35 ]; 36 37 nativeCheckInputs = [ 38 numpy 39 pytest-xdist 40 pytestCheckHook 41 ]; 42 43 disabledTests = [ 44 # Tests started failing with numpy 1.24 45 "test_numpy_numeric_type_complex" 46 "test_numpy_numeric_type_float" 47 "test_numpy_numeric_type_int" 48 ]; 49 50 pythonImportsCheck = [ "hamcrest" ]; 51 52 meta = with lib; { 53 description = "Hamcrest framework for matcher objects"; 54 homepage = "https://github.com/hamcrest/PyHamcrest"; 55 license = licenses.bsd3; 56 maintainers = with maintainers; [ alunduil ]; 57 }; 58}