at 22.05-pre 1.2 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, isPy3k 5, requests 6, requests_oauthlib 7, isodate 8, certifi 9, enum34 ? null 10, typing 11, aiohttp 12, aiodns 13, pytest 14, httpretty 15, mock 16, futures ? null 17, trio 18}: 19 20buildPythonPackage rec { 21 version = "0.6.21"; 22 pname = "msrest"; 23 24 # no tests in PyPI tarball 25 # see https://github.com/Azure/msrest-for-python/pull/152 26 src = fetchFromGitHub { 27 owner = "Azure"; 28 repo = "msrest-for-python"; 29 rev = "v${version}"; 30 sha256 = "sha256-IlBwlVQ/v+vJmCWNbFZKGL6a9K09z4AYrPm3kwaA/nI="; 31 }; 32 33 propagatedBuildInputs = [ 34 requests requests_oauthlib isodate certifi 35 ] ++ lib.optionals (!isPy3k) [ enum34 typing ] 36 ++ lib.optionals isPy3k [ aiohttp aiodns ]; 37 38 checkInputs = [ pytest httpretty ] 39 ++ lib.optionals (!isPy3k) [ mock futures ] 40 ++ lib.optional isPy3k trio; 41 42 # Deselected tests require network access 43 checkPhase = '' 44 pytest tests/ -k "not test_conf_async_trio_requests" 45 ''; 46 47 meta = with lib; { 48 description = "The runtime library 'msrest' for AutoRest generated Python clients."; 49 homepage = "https://github.com/Azure/msrest-for-python"; 50 license = licenses.mit; 51 maintainers = with maintainers; [ bendlas jonringer maxwilson ]; 52 }; 53}