Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.03 1.2 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, isPy3k 5, requests 6, requests_oauthlib 7, isodate 8, certifi 9, enum34 10, typing 11, aiohttp 12, aiodns 13, pytest 14, httpretty 15, mock 16, futures 17, trio 18}: 19 20buildPythonPackage rec { 21 version = "0.6.4"; 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 = "0ilrc06qq0dw4qqzq1dq2vs6nymc39h19w52dwcyawwfalalnjzi"; 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://azure.microsoft.com/en-us/develop/python/"; 50 license = licenses.mit; 51 maintainers = with maintainers; [ bendlas ]; 52 }; 53}