1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 httpx,
7 microsoft-kiota-abstractions,
8 opentelemetry-api,
9 opentelemetry-sdk,
10 pytest-asyncio,
11 pytest-mock,
12 pytestCheckHook,
13 pythonOlder,
14 urllib3,
15}:
16
17buildPythonPackage rec {
18 pname = "microsoft-kiota-http";
19 version = "1.9.4";
20 pyproject = true;
21
22 disabled = pythonOlder "3.9";
23
24 src = fetchFromGitHub {
25 owner = "microsoft";
26 repo = "kiota-python";
27 tag = "microsoft-kiota-serialization-text-v${version}";
28 hash = "sha256-59vuJc7Wb/6PsPA4taAFA2UK8bdz+raZ+NB4S8LahtM=";
29 };
30
31 sourceRoot = "${src.name}/packages/http/httpx/";
32
33 build-system = [ poetry-core ];
34
35 dependencies = [
36 httpx
37 microsoft-kiota-abstractions
38 opentelemetry-api
39 opentelemetry-sdk
40 ]
41 ++ httpx.optional-dependencies.http2;
42
43 nativeCheckInputs = [
44 pytest-asyncio
45 pytest-mock
46 pytestCheckHook
47 urllib3
48 ];
49
50 pythonImportsCheck = [ "kiota_http" ];
51
52 meta = with lib; {
53 description = "HTTP request adapter implementation for Kiota clients for Python";
54 homepage = "https://github.com/microsoft/kiota-python/tree/main/packages/http/httpx";
55 changelog = "https://github.com/microsoft/kiota-python/releases/tag/microsoft-kiota-http-${src.tag}";
56 license = licenses.mit;
57 maintainers = with maintainers; [ fab ];
58 };
59}