1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 click,
6 ordered-set,
7 orjson,
8 clevercsv,
9 jsonpickle,
10 numpy,
11 pytestCheckHook,
12 python-dateutil,
13 pyyaml,
14 toml,
15 tomli-w,
16 pythonOlder,
17}:
18
19buildPythonPackage rec {
20 pname = "deepdiff";
21 version = "6.7.1";
22 format = "setuptools";
23
24 disabled = pythonOlder "3.7";
25
26 src = fetchFromGitHub {
27 owner = "seperman";
28 repo = "deepdiff";
29 rev = "refs/tags/${version}";
30 hash = "sha256-YGYprSC5j06Ozg0dUJN5xnba0HUgiXa+d9Ci3czGWoY=";
31 };
32
33 postPatch = ''
34 substituteInPlace tests/test_command.py \
35 --replace '/tmp/' "$TMPDIR/"
36 '';
37
38 propagatedBuildInputs = [
39 ordered-set
40 orjson
41 ];
42
43 passthru.optional-dependencies = {
44 cli = [
45 clevercsv
46 click
47 pyyaml
48 toml
49 ];
50 };
51
52 nativeCheckInputs = [
53 jsonpickle
54 numpy
55 pytestCheckHook
56 python-dateutil
57 tomli-w
58 ] ++ passthru.optional-dependencies.cli;
59
60 disabledTests = [
61 # not compatible with pydantic 2.x
62 "test_pydantic1"
63 "test_pydantic2"
64 ];
65
66 pythonImportsCheck = [ "deepdiff" ];
67
68 meta = with lib; {
69 description = "Deep Difference and Search of any Python object/data";
70 mainProgram = "deep";
71 homepage = "https://github.com/seperman/deepdiff";
72 changelog = "https://github.com/seperman/deepdiff/releases/tag/${version}";
73 license = licenses.mit;
74 maintainers = with maintainers; [ mic92 ];
75 };
76}