1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, pytestCheckHook
6, pytest-asyncio
7, pretend
8, freezegun
9, hatch-fancy-pypi-readme
10, hatch-vcs
11, hatchling
12, simplejson
13, typing-extensions
14, pythonAtLeast
15}:
16
17buildPythonPackage rec {
18 pname = "structlog";
19 version = "22.3.0";
20 format = "pyproject";
21
22 src = fetchFromGitHub {
23 owner = "hynek";
24 repo = "structlog";
25 rev = "refs/tags/${version}";
26 hash = "sha256-+r+M+uTXdNBWQf0TGQuZgsCXg2CBKwH8ZE2+uAe0Dzg=";
27 };
28
29 nativeBuildInputs = [
30 hatch-fancy-pypi-readme
31 hatch-vcs
32 hatchling
33 ];
34
35 SETUPTOOLS_SCM_PRETEND_VERSION = version;
36
37 propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
38 typing-extensions
39 ];
40
41 pythonImportsCheck = [
42 "structlog"
43 ];
44
45 nativeCheckInputs = [
46 freezegun
47 pretend
48 pytest-asyncio
49 pytestCheckHook
50 simplejson
51 ];
52
53 meta = with lib; {
54 description = "Painless structural logging";
55 homepage = "https://github.com/hynek/structlog";
56 license = licenses.asl20;
57 maintainers = with maintainers; [ ];
58 };
59}