2019-03-19 15:58:12 +01:00
|
|
|
{ lib
|
2018-12-20 00:06:57 +01:00
|
|
|
, buildPythonPackage
|
2019-05-21 20:12:38 +02:00
|
|
|
, fetchFromGitHub
|
2019-03-19 22:01:54 +01:00
|
|
|
, isPy3k
|
2019-03-19 15:58:12 +01:00
|
|
|
, requests
|
2018-12-20 00:06:57 +01:00
|
|
|
, requests_oauthlib
|
|
|
|
, isodate
|
2019-03-19 15:58:12 +01:00
|
|
|
, certifi
|
2019-03-19 22:01:54 +01:00
|
|
|
, enum34
|
|
|
|
, typing
|
2019-03-19 15:58:12 +01:00
|
|
|
, aiohttp
|
|
|
|
, aiodns
|
|
|
|
, pytest
|
|
|
|
, httpretty
|
2019-03-19 22:01:54 +01:00
|
|
|
, mock
|
|
|
|
, futures
|
2019-03-19 16:38:39 +01:00
|
|
|
, trio
|
2018-12-20 00:06:57 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-02-10 22:51:23 +01:00
|
|
|
version = "0.6.11";
|
2018-12-20 00:06:57 +01:00
|
|
|
pname = "msrest";
|
|
|
|
|
2019-05-21 20:12:38 +02:00
|
|
|
# no tests in PyPI tarball
|
|
|
|
# see https://github.com/Azure/msrest-for-python/pull/152
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Azure";
|
|
|
|
repo = "msrest-for-python";
|
|
|
|
rev = "v${version}";
|
2020-02-10 22:51:23 +01:00
|
|
|
sha256 = "1lq3bf7kzs9h9sk6ahpf0vidklv0ahx3bm4wpv3qka3jb64yqdmi";
|
2018-12-20 00:06:57 +01:00
|
|
|
};
|
|
|
|
|
2019-03-19 15:58:12 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests requests_oauthlib isodate certifi
|
2019-03-19 22:01:54 +01:00
|
|
|
] ++ lib.optionals (!isPy3k) [ enum34 typing ]
|
|
|
|
++ lib.optionals isPy3k [ aiohttp aiodns ];
|
2019-03-19 15:58:12 +01:00
|
|
|
|
2019-03-19 16:38:39 +01:00
|
|
|
checkInputs = [ pytest httpretty ]
|
2019-03-19 22:01:54 +01:00
|
|
|
++ lib.optionals (!isPy3k) [ mock futures ]
|
|
|
|
++ lib.optional isPy3k trio;
|
2019-03-19 15:58:12 +01:00
|
|
|
|
2019-03-19 16:38:39 +01:00
|
|
|
# Deselected tests require network access
|
2019-03-19 15:58:12 +01:00
|
|
|
checkPhase = ''
|
2019-03-19 16:38:39 +01:00
|
|
|
pytest tests/ -k "not test_conf_async_trio_requests"
|
2019-03-19 15:58:12 +01:00
|
|
|
'';
|
2018-12-20 00:06:57 +01:00
|
|
|
|
2019-03-19 15:58:12 +01:00
|
|
|
meta = with lib; {
|
2018-12-20 00:06:57 +01:00
|
|
|
description = "The runtime library 'msrest' for AutoRest generated Python clients.";
|
2020-02-10 22:51:23 +01:00
|
|
|
homepage = "https://github.com/Azure/msrest-for-python";
|
2018-12-20 00:06:57 +01:00
|
|
|
license = licenses.mit;
|
2019-05-21 20:12:38 +02:00
|
|
|
maintainers = with maintainers; [ bendlas jonringer mwilsoninsight ];
|
2018-12-20 00:06:57 +01:00
|
|
|
};
|
|
|
|
}
|