1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 gevent,
6 pytestCheckHook,
7 setuptools,
8 pythonOlder,
9 watchdog,
10}:
11
12buildPythonPackage rec {
13 pname = "watchdog-gevent";
14 version = "0.2.1";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 pname = "watchdog_gevent";
21 inherit version;
22 hash = "sha256-rmuU0PjIzhxZVs2GX2ErYfRWzxmAF0S7olo0n+jowzc=";
23 };
24
25 postPatch = ''
26 sed -i setup.cfg \
27 -e 's:--cov watchdog_gevent::' \
28 -e 's:--cov-report html::'
29
30 substituteInPlace tests/test_observer.py \
31 --replace-fail 'events == [FileModifiedEvent(__file__)]' 'FileModifiedEvent(__file__) in events'
32 '';
33
34 build-system = [ setuptools ];
35
36 dependencies = [
37 gevent
38 watchdog
39 ];
40
41 nativeCheckInputs = [ pytestCheckHook ];
42
43 pythonImportsCheck = [ "watchdog_gevent" ];
44
45 meta = with lib; {
46 description = "Gevent-based observer for watchdog";
47 homepage = "https://github.com/Bogdanp/watchdog_gevent";
48 license = licenses.asl20;
49 maintainers = with maintainers; [ traxys ];
50 };
51}