1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6
7 # build-system
8 setuptools,
9
10 # dependencies
11 click,
12 orderly-set,
13 orjson,
14
15 # optional-dependencies
16 clevercsv,
17
18 # tests
19 jsonpickle,
20 numpy,
21 pytestCheckHook,
22 python-dateutil,
23 pyyaml,
24 toml,
25 tomli-w,
26 polars,
27 pandas,
28}:
29
30buildPythonPackage rec {
31 pname = "deepdiff";
32 version = "8.1.1";
33 pyproject = true;
34
35 disabled = pythonOlder "3.7";
36
37 src = fetchFromGitHub {
38 owner = "seperman";
39 repo = "deepdiff";
40 tag = version;
41 hash = "sha256-b1L+8xOqxY2nI8UxZHxs3x28mVAzaRuPjYlPSqSapwk=";
42 };
43
44 build-system = [
45 setuptools
46 ];
47
48 dependencies = [
49 click
50 orderly-set
51 orjson
52 ];
53 pythonRelaxDeps = [
54 # Upstream develops this package as well, and from some reason pins this
55 # dependency to a patch version below this one. No significant changes
56 # happend in that relase, so we shouldn't worry, especially if tests pass.
57 "orderly-set"
58 ];
59
60 optional-dependencies = {
61 cli = [
62 clevercsv
63 click
64 pyyaml
65 toml
66 ];
67 };
68
69 nativeCheckInputs = [
70 jsonpickle
71 numpy
72 pytestCheckHook
73 python-dateutil
74 tomli-w
75 polars
76 pandas
77 ] ++ optional-dependencies.cli;
78
79 disabledTests = [
80 # not compatible with pydantic 2.x
81 "test_pydantic1"
82 "test_pydantic2"
83 # Require pytest-benchmark
84 "test_cache_deeply_nested_a1"
85 "test_lfu"
86 ];
87
88 pythonImportsCheck = [ "deepdiff" ];
89
90 meta = {
91 description = "Deep Difference and Search of any Python object/data";
92 mainProgram = "deep";
93 homepage = "https://github.com/seperman/deepdiff";
94 changelog = "https://github.com/seperman/deepdiff/releases/tag/${version}";
95 license = lib.licenses.mit;
96 maintainers = with lib.maintainers; [
97 mic92
98 doronbehar
99 ];
100 };
101}