1{
2 lib,
3 aiodns,
4 aiohttp,
5 azure-core,
6 buildPythonPackage,
7 certifi,
8 fetchFromGitHub,
9 httpretty,
10 isodate,
11 pytest-aiohttp,
12 pytestCheckHook,
13 pythonAtLeast,
14 pythonOlder,
15 requests,
16 requests-oauthlib,
17 setuptools,
18 trio,
19}:
20
21buildPythonPackage {
22 pname = "msrest";
23 version = "0.7.1";
24 pyproject = true;
25
26 disabled = pythonOlder "3.7";
27
28 src = fetchFromGitHub {
29 owner = "Azure";
30 repo = "msrest-for-python";
31 # no tag for 0.7.1
32 rev = "2d8fd04f68a124d0f3df7b81584accc3270b1afc";
33 hash = "sha256-1EXXXflhDeU+erdI+NsWxSX76ooDTl3+MyQwRzm2xV0=";
34 };
35
36 nativeBuildInputs = [ setuptools ];
37
38 propagatedBuildInputs = [
39 azure-core
40 aiodns
41 aiohttp
42 certifi
43 isodate
44 requests
45 requests-oauthlib
46 ];
47
48 nativeCheckInputs = [
49 httpretty
50 pytest-aiohttp
51 pytestCheckHook
52 trio
53 ];
54
55 disabledTests =
56 [
57 # Test require network access
58 "test_basic_aiohttp"
59 "test_basic_aiohttp"
60 "test_basic_async_requests"
61 "test_basic_async_requests"
62 "test_conf_async_requests"
63 "test_conf_async_requests"
64 "test_conf_async_trio_requests"
65 ]
66 ++ lib.optionals (pythonAtLeast "3.12") [
67 # AttributeError: 'TestAuthentication' object has no attribute...
68 "test_apikey_auth"
69 "test_cs_auth"
70 "test_eventgrid_auth"
71 "test_eventgrid_domain_auth"
72 ];
73
74 pythonImportsCheck = [ "msrest" ];
75
76 meta = with lib; {
77 description = "Runtime library for AutoRest generated Python clients";
78 homepage = "https://github.com/Azure/msrest-for-python";
79 license = licenses.mit;
80 maintainers = with maintainers; [
81 bendlas
82 maxwilson
83 ];
84 };
85}