python313Packages.traits: fix build (#373698)
[NixPkgs.git] / pkgs / development / python-modules / python-json-logger / default.nix
blobba9de7ec3d1eab9f337eb00261d9394cf0e76362
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   setuptools,
6   pytestCheckHook,
7   pythonAtLeast,
8 }:
10 buildPythonPackage rec {
11   pname = "python-json-logger";
12   version = "2.0.7";
13   pyproject = true;
15   src = fetchPypi {
16     inherit pname version;
17     hash = "sha256-I+fsAtNCN8WqHimgcBk6Tqh1g7tOf4/QbT3oJkxLLhw=";
18   };
20   build-system = [ setuptools ];
22   nativeCheckInputs = [ pytestCheckHook ];
24   disabledTests =
25     lib.optionals (pythonAtLeast "3.12") [
26       # https://github.com/madzak/python-json-logger/issues/185
27       "test_custom_object_serialization"
28       "test_percentage_format"
29       "test_rename_reserved_attrs"
30     ]
31     ++ lib.optionals (pythonAtLeast "3.13") [
32       # https://github.com/madzak/python-json-logger/issues/198
33       "test_json_default_encoder_with_timestamp"
34     ];
36   meta = with lib; {
37     description = "Json Formatter for the standard python logger";
38     homepage = "https://github.com/madzak/python-json-logger";
39     license = licenses.bsdOriginal;
40     maintainers = [ ];
41   };