2019-03-19 14:58:12 +00:00
|
|
|
{ lib
|
2018-12-19 23:06:57 +00:00
|
|
|
, buildPythonPackage
|
2019-06-19 19:53:37 +01:00
|
|
|
, fetchPypi
|
2019-03-19 21:01:54 +00:00
|
|
|
, isPy3k
|
2019-03-19 14:58:12 +00:00
|
|
|
, requests
|
2018-12-19 23:06:57 +00:00
|
|
|
, requests_oauthlib
|
|
|
|
, isodate
|
2019-03-19 14:58:12 +00:00
|
|
|
, certifi
|
2019-03-19 21:01:54 +00:00
|
|
|
, enum34
|
|
|
|
, typing
|
2019-03-19 14:58:12 +00:00
|
|
|
, aiohttp
|
|
|
|
, aiodns
|
|
|
|
, pytest
|
|
|
|
, httpretty
|
2019-03-19 21:01:54 +00:00
|
|
|
, mock
|
|
|
|
, futures
|
2019-03-19 15:38:39 +00:00
|
|
|
, trio
|
2018-12-19 23:06:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2019-06-19 19:53:37 +01:00
|
|
|
version = "0.6.7";
|
2018-12-19 23:06:57 +00:00
|
|
|
pname = "msrest";
|
|
|
|
|
2019-06-19 19:53:37 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "07136g3j7zgcvkxki4v6q1p2dm1nzzc28181s8dwic0y4ml8qlq5";
|
2018-12-19 23:06:57 +00:00
|
|
|
};
|
|
|
|
|
2019-03-19 14:58:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests requests_oauthlib isodate certifi
|
2019-03-19 21:01:54 +00:00
|
|
|
] ++ lib.optionals (!isPy3k) [ enum34 typing ]
|
|
|
|
++ lib.optionals isPy3k [ aiohttp aiodns ];
|
2019-03-19 14:58:12 +00:00
|
|
|
|
2019-03-19 15:38:39 +00:00
|
|
|
checkInputs = [ pytest httpretty ]
|
2019-03-19 21:01:54 +00:00
|
|
|
++ lib.optionals (!isPy3k) [ mock futures ]
|
|
|
|
++ lib.optional isPy3k trio;
|
2019-03-19 14:58:12 +00:00
|
|
|
|
2019-03-19 15:38:39 +00:00
|
|
|
# Deselected tests require network access
|
2019-03-19 14:58:12 +00:00
|
|
|
checkPhase = ''
|
2019-03-19 15:38:39 +00:00
|
|
|
pytest tests/ -k "not test_conf_async_trio_requests"
|
2019-03-19 14:58:12 +00:00
|
|
|
'';
|
2018-12-19 23:06:57 +00:00
|
|
|
|
2019-03-19 14:58:12 +00:00
|
|
|
meta = with lib; {
|
2018-12-19 23:06:57 +00:00
|
|
|
description = "The runtime library 'msrest' for AutoRest generated Python clients.";
|
|
|
|
homepage = "https://azure.microsoft.com/en-us/develop/python/";
|
|
|
|
license = licenses.mit;
|
2019-06-19 19:53:37 +01:00
|
|
|
maintainers = with maintainers; [ bendlas jonringer ];
|
2018-12-19 23:06:57 +00:00
|
|
|
};
|
|
|
|
}
|