forked from mirrors/nixpkgs
50 lines
1 KiB
Nix
50 lines
1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, isPy3k
|
|
, requests
|
|
, requests_oauthlib
|
|
, isodate
|
|
, certifi
|
|
, enum34
|
|
, typing
|
|
, aiohttp
|
|
, aiodns
|
|
, pytest
|
|
, httpretty
|
|
, mock
|
|
, futures
|
|
, trio
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
version = "0.6.7";
|
|
pname = "msrest";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "07136g3j7zgcvkxki4v6q1p2dm1nzzc28181s8dwic0y4ml8qlq5";
|
|
};
|
|
|
|
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://azure.microsoft.com/en-us/develop/python/";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ bendlas jonringer ];
|
|
};
|
|
}
|