blob: f38b732f9ebb3de7da46514e35e1930960601dd2 (
plain) (
blame)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, pathtools
, pyyaml
, flaky
, pytest-timeout
, pytestCheckHook
, CoreServices
, fetchpatch
}:
buildPythonPackage rec {
pname = "watchdog";
version = "2.1.9";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-Q84g67NqUfIfo3b3bR1GkkUrJSfM1gGVDWntNrniFgk=";
};
patches = lib.optionals (stdenv.isDarwin && !stdenv.isAarch64) [
./force-kqueue.patch
] ++ [
(fetchpatch {
url = "https://github.com/gorakhargosh/watchdog/commit/255d1e45c17929dd5ba8a6f91aa28771109931cd.patch";
sha256 = "sha256-gGgEGuB/0g+4Pv1dXMvIdObjqKruWKkxtufS/dzSlY8=";
excludes = [ "changelog.rst" ];
})
];
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
propagatedBuildInputs = [
pathtools
pyyaml
];
checkInputs = [
flaky
pytest-timeout
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.cfg \
--replace "--cov=watchdog" "" \
--replace "--cov-report=term-missing" ""
'';
disabledTests = [
# probably failing because of an encoding related issue
"test_create_wrong_encoding"
] ++ lib.optionals (stdenv.isDarwin && !stdenv.isAarch64) [
"test_delete"
];
disabledTestPaths = [
# Tests are flaky
"tests/test_inotify_buffer.py"
];
pythonImportsCheck = [
"watchdog"
];
meta = with lib; {
description = "Python API and shell utilities to monitor file system events";
homepage = "https://github.com/gorakhargosh/watchdog";
license = licenses.asl20;
maintainers = with maintainers; [ goibhniu ];
};
}
|