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