1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5, hatchling
6, decorator
7, requests
8, typing ? null
9, configparser
10, click
11, freezegun
12, mock
13, pytestCheckHook
14, pytest-vcr
15, python-dateutil
16, vcrpy
17}:
18
19buildPythonPackage rec {
20 pname = "datadog";
21 version = "0.44.0";
22 format = "pyproject";
23
24 src = fetchPypi {
25 inherit pname version;
26 sha256 = "sha256-BxFw8MfvIlEdv3+b12xL5QDuLT1SBykApch7VJXSxzM=";
27 };
28
29 postPatch = ''
30 find . -name '*.pyc' -exec rm {} \;
31 '';
32
33 nativeBuildInputs = [
34 hatchling
35 ];
36
37 propagatedBuildInputs = [ decorator requests ]
38 ++ lib.optional (pythonOlder "3.5") typing
39 ++ lib.optional (pythonOlder "3.0") configparser;
40
41 checkInputs = [
42 click
43 freezegun
44 mock
45 pytestCheckHook
46 pytest-vcr
47 python-dateutil
48 vcrpy
49 ];
50
51 disabledTestPaths = [
52 "tests/performance"
53 ];
54
55 disabledTests = [
56 "test_default_settings_set"
57 ];
58
59 pythonImportsCheck = [ "datadog" ];
60
61 meta = with lib; {
62 description = "The Datadog Python library";
63 license = licenses.bsd3;
64 homepage = "https://github.com/DataDog/datadogpy";
65 };
66}