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