diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/python-modules/msrest/default.nix')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/development/python-modules/msrest/default.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/msrest/default.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/msrest/default.nix new file mode 100644 index 000000000000..1f21778f7db8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/msrest/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, isPy3k +, requests +, requests_oauthlib +, isodate +, certifi +, enum34 +, typing +, aiohttp +, aiodns +, pytest +, httpretty +, mock +, futures +, trio +}: + +buildPythonPackage rec { + version = "0.6.18"; + 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}"; + sha256 = "0j0dbca47qnxnhpfgj3v5bglg8dpx2cy1psix8kp3ldrkf6rjwdb"; + }; + + 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; + maintainers = with maintainers; [ bendlas jonringer maxwilson ]; + }; +} |