1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 flit-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.3.1";
20 pyproject = true;
21
22 disabled = pythonOlder "3.8";
23
24 src = fetchFromGitHub {
25 owner = "microsoft";
26 repo = "kiota-http-python";
27 rev = "refs/tags/v${version}";
28 hash = "sha256-I16WARk6YBr8KgE9MtHcA5VdsnLXBKcZOaqRL/eqwKE=";
29 };
30
31 build-system = [ flit-core ];
32
33 dependencies = [
34 httpx
35 microsoft-kiota-abstractions
36 opentelemetry-api
37 opentelemetry-sdk
38 ] ++ httpx.optional-dependencies.http2;
39
40 nativeCheckInputs = [
41 pytest-asyncio
42 pytest-mock
43 pytestCheckHook
44 urllib3
45 ];
46
47 pythonImportsCheck = [ "kiota_http" ];
48
49 meta = with lib; {
50 description = "HTTP request adapter implementation for Kiota clients for Python";
51 homepage = "https://github.com/microsoft/kiota-http-python";
52 changelog = "https://github.com/microsoft/kiota-http-python/blob/${version}/CHANGELOG.md";
53 license = licenses.mit;
54 maintainers = with maintainers; [ fab ];
55 };
56}