2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy3k
|
|
|
|
, requests
|
|
|
|
, requests_oauthlib
|
|
|
|
, isodate
|
|
|
|
, certifi
|
2021-04-26 19:14:03 +00:00
|
|
|
, enum34 ? null
|
2020-04-24 23:36:52 +00:00
|
|
|
, typing
|
|
|
|
, aiohttp
|
|
|
|
, aiodns
|
|
|
|
, pytest
|
|
|
|
, httpretty
|
|
|
|
, mock
|
2021-04-26 19:14:03 +00:00
|
|
|
, futures ? null
|
2020-04-24 23:36:52 +00:00
|
|
|
, trio
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-03-15 08:37:03 +00:00
|
|
|
version = "0.6.21";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "msrest";
|
|
|
|
|
|
|
|
# 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}";
|
2021-03-15 08:37:03 +00:00
|
|
|
sha256 = "sha256-IlBwlVQ/v+vJmCWNbFZKGL6a9K09z4AYrPm3kwaA/nI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests requests_oauthlib isodate certifi
|
|
|
|
] ++ lib.optionals (!isPy3k) [ enum34 typing ]
|
|
|
|
++ lib.optionals isPy3k [ aiohttp aiodns ];
|
|
|
|
|
|
|
|
checkInputs = [ pytest httpretty ]
|
|
|
|
++ lib.optionals (!isPy3k) [ mock futures ]
|
|
|
|
++ lib.optional isPy3k trio;
|
|
|
|
|
|
|
|
# Deselected tests require network access
|
|
|
|
checkPhase = ''
|
|
|
|
pytest tests/ -k "not test_conf_async_trio_requests"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The runtime library 'msrest' for AutoRest generated Python clients.";
|
|
|
|
homepage = "https://github.com/Azure/msrest-for-python";
|
|
|
|
license = licenses.mit;
|
2020-11-19 00:13:47 +00:00
|
|
|
maintainers = with maintainers; [ bendlas jonringer maxwilson ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|