From 01dbbb39ec485d437fad2db25293f4a375a263ac Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Thu, 21 Nov 2024 11:20:32 +0100 Subject: [PATCH] python312Packages.pygelf: init at 0.4.2 --- .../python-modules/pygelf/default.nix | 50 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 52 insertions(+) create mode 100644 pkgs/development/python-modules/pygelf/default.nix diff --git a/pkgs/development/python-modules/pygelf/default.nix b/pkgs/development/python-modules/pygelf/default.nix new file mode 100644 index 000000000000..bb5735771c74 --- /dev/null +++ b/pkgs/development/python-modules/pygelf/default.nix @@ -0,0 +1,50 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, + mock, + pytestCheckHook, + requests, +}: +buildPythonPackage rec { + pname = "pygelf"; + version = "0.4.2"; + pyproject = true; + + src = fetchPypi { + pname = "pygelf"; + inherit version; + hash = "sha256-0LuPRf9kipoYdxP0oFwJ9oX8uK3XsEu3Rx8gBxvRGq0="; + }; + + build-system = [ setuptools ]; + + pythonImportsCheck = [ "pygelf" ]; + + nativeCheckInputs = [ + mock + pytestCheckHook + requests + ]; + + disabledTests = [ + # ConnectionRefusedError: [Errno 111] Connection refused + "test_static_fields" + "test_dynamic_fields" + ]; + + disabledTestPaths = [ + # These tests requires files that are stripped off by Pypi packaging + "tests/test_queuehandler_support.py" + "tests/test_debug_mode.py" + "tests/test_common_fields.py" + ]; + + meta = { + description = "Python logging handlers with GELF (Graylog Extended Log Format) support"; + homepage = "https://github.com/keeprocking/pygelf"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ drupol ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 63be75ca0110..04f9ff0e621d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10397,6 +10397,8 @@ self: super: with self; { pyfreedompro = callPackage ../development/python-modules/pyfreedompro { }; + pygelf = callPackage ../development/python-modules/pygelf { }; + pygments-style-github = callPackage ../development/python-modules/pygments-style-github { }; pygnmi = callPackage ../development/python-modules/pygnmi { };