1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 mock,
7 pytestCheckHook,
8 requests,
9}:
10buildPythonPackage rec {
11 pname = "pygelf";
12 version = "0.4.2";
13 pyproject = true;
14
15 src = fetchPypi {
16 pname = "pygelf";
17 inherit version;
18 hash = "sha256-0LuPRf9kipoYdxP0oFwJ9oX8uK3XsEu3Rx8gBxvRGq0=";
19 };
20
21 build-system = [ setuptools ];
22
23 pythonImportsCheck = [ "pygelf" ];
24
25 nativeCheckInputs = [
26 mock
27 pytestCheckHook
28 requests
29 ];
30
31 disabledTests = [
32 # ConnectionRefusedError: [Errno 111] Connection refused
33 "test_static_fields"
34 "test_dynamic_fields"
35 ];
36
37 disabledTestPaths = [
38 # These tests requires files that are stripped off by Pypi packaging
39 "tests/test_queuehandler_support.py"
40 "tests/test_debug_mode.py"
41 "tests/test_common_fields.py"
42 ];
43
44 meta = {
45 description = "Python logging handlers with GELF (Graylog Extended Log Format) support";
46 homepage = "https://github.com/keeprocking/pygelf";
47 license = lib.licenses.bsd3;
48 maintainers = with lib.maintainers; [ drupol ];
49 };
50}