at 25.11-pre 95 lines 1.9 kB view raw
1{ 2 lib, 3 aiohttp, 4 buildPythonPackage, 5 certifi, 6 fetchFromGitHub, 7 mock, 8 opentelemetry-api, 9 opentelemetry-sdk, 10 orjson, 11 pytest-asyncio, 12 pytest-httpserver, 13 pytestCheckHook, 14 pythonOlder, 15 requests, 16 respx, 17 setuptools, 18 trustme, 19 urllib3, 20}: 21 22buildPythonPackage rec { 23 pname = "elastic-transport"; 24 version = "8.17.0"; 25 pyproject = true; 26 27 disabled = pythonOlder "3.7"; 28 29 src = fetchFromGitHub { 30 owner = "elastic"; 31 repo = "elastic-transport-python"; 32 tag = "v${version}"; 33 hash = "sha256-ZCzG7a/SWvUDWiIWwzVfj4JG/w7XUa25yKuuR53XCEQ="; 34 }; 35 36 postPatch = '' 37 substituteInPlace setup.cfg \ 38 --replace " --cov-report=term-missing --cov=elastic_transport" "" 39 ''; 40 41 build-system = [ setuptools ]; 42 43 propagatedBuildInputs = [ 44 urllib3 45 certifi 46 ]; 47 48 nativeCheckInputs = [ 49 aiohttp 50 mock 51 opentelemetry-api 52 opentelemetry-sdk 53 orjson 54 pytest-asyncio 55 pytest-httpserver 56 pytestCheckHook 57 requests 58 respx 59 trustme 60 ]; 61 62 pythonImportsCheck = [ "elastic_transport" ]; 63 64 pytestFlagsArray = [ 65 "-W" 66 "ignore::DeprecationWarning" 67 ]; 68 69 disabledTests = [ 70 # Tests require network access 71 "fingerprint" 72 "ssl" 73 "test_custom_headers" 74 "test_custom_user_agent" 75 "test_default_headers" 76 "test_head" 77 "tls" 78 "test_simple_request" 79 "test_node" 80 "test_debug_logging" 81 "test_debug_logging_uncompressed_body" 82 "test_debug_logging_no_body" 83 "test_httpbin" 84 "test_sniffed_nodes_added_to_pool" 85 "test_async_transport_httpbin" 86 ]; 87 88 meta = with lib; { 89 description = "Transport classes and utilities shared among Python Elastic client libraries"; 90 homepage = "https://github.com/elasticsearch/elastic-transport-python"; 91 changelog = "https://github.com/elastic/elastic-transport-python/releases/tag/${src.tag}"; 92 license = licenses.asl20; 93 maintainers = with maintainers; [ fab ]; 94 }; 95}