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