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