at 25.11-pre 1.6 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonAtLeast, 6 7 # build-system 8 hatchling, 9 10 # dependencies 11 requests, 12 13 # testing 14 click, 15 freezegun, 16 mock, 17 pytest-vcr, 18 pytestCheckHook, 19 python-dateutil, 20 vcrpy, 21}: 22 23buildPythonPackage rec { 24 pname = "datadog"; 25 version = "0.51.0"; 26 pyproject = true; 27 28 src = fetchFromGitHub { 29 owner = "DataDog"; 30 repo = "datadogpy"; 31 tag = "v${version}"; 32 hash = "sha256-DIuKawqOzth8XYF+M3fYm2kMeo3UbfS34/Qa4Y9V1h8="; 33 }; 34 35 build-system = [ hatchling ]; 36 37 dependencies = [ requests ]; 38 39 __darwinAllowLocalNetworking = true; 40 41 nativeCheckInputs = [ 42 click 43 freezegun 44 mock 45 pytestCheckHook 46 pytest-vcr 47 python-dateutil 48 vcrpy 49 ]; 50 51 disabledTestPaths = [ 52 "tests/performance" 53 # https://github.com/DataDog/datadogpy/issues/800 54 "tests/integration/api/test_*.py" 55 ]; 56 57 disabledTests = 58 [ 59 "test_default_settings_set" 60 # https://github.com/DataDog/datadogpy/issues/746 61 "TestDogshell" 62 63 # Flaky: test execution time aganst magic values 64 "test_distributed" 65 "test_timed" 66 "test_timed_in_ms" 67 "test_timed_start_stop_calls" 68 ] 69 ++ lib.optionals (pythonAtLeast "3.13") [ 70 # https://github.com/DataDog/datadogpy/issues/880 71 "test_timed_coroutine" 72 ]; 73 74 pythonImportsCheck = [ "datadog" ]; 75 76 meta = { 77 description = "Datadog Python library"; 78 homepage = "https://github.com/DataDog/datadogpy"; 79 changelog = "https://github.com/DataDog/datadogpy/blob/v${version}/CHANGELOG.md"; 80 license = lib.licenses.bsd3; 81 maintainers = [ lib.maintainers.sarahec ]; 82 }; 83}