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 gitUpdater,
16}:
17
18buildPythonPackage rec {
19 pname = "microsoft-kiota-http";
20 version = "1.9.7";
21 pyproject = true;
22
23 disabled = pythonOlder "3.9";
24
25 src = fetchFromGitHub {
26 owner = "microsoft";
27 repo = "kiota-python";
28 tag = "microsoft-kiota-http-v${version}";
29 hash = "sha256-ovmGka0YxhjPQYodHAMpcrqLMpXEqSTeky3n/rC7Ohs=";
30 };
31
32 sourceRoot = "${src.name}/packages/http/httpx/";
33
34 build-system = [ poetry-core ];
35
36 dependencies = [
37 httpx
38 microsoft-kiota-abstractions
39 opentelemetry-api
40 opentelemetry-sdk
41 ]
42 ++ httpx.optional-dependencies.http2;
43
44 nativeCheckInputs = [
45 pytest-asyncio
46 pytest-mock
47 pytestCheckHook
48 urllib3
49 ];
50
51 pythonImportsCheck = [ "kiota_http" ];
52
53 passthru.updateScript = gitUpdater {
54 rev-prefix = "microsoft-kiota-http-v";
55 };
56
57 meta = with lib; {
58 description = "HTTP request adapter implementation for Kiota clients for Python";
59 homepage = "https://github.com/microsoft/kiota-python/tree/main/packages/http/httpx";
60 changelog = "https://github.com/microsoft/kiota-python/releases/tag/${src.tag}";
61 license = licenses.mit;
62 maintainers = with maintainers; [ fab ];
63 };
64}