nixpkgs-suyu/pkgs/development/python-modules/msrest/default.nix
Robert Schütz 0cbe2fa18c python.pkgs.msrest: cleanup
I accidentally pushed fcf74c6 in a premature state.
2019-03-19 16:40:24 +01:00

49 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonAtLeast
, requests
, requests_oauthlib
, isodate
, certifi
, aiohttp
, aiodns
, pytest
, httpretty
, trio
}:
buildPythonPackage rec {
version = "0.6.4";
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 = "0ilrc06qq0dw4qqzq1dq2vs6nymc39h19w52dwcyawwfalalnjzi";
};
propagatedBuildInputs = [
requests requests_oauthlib isodate certifi
# optional
aiohttp aiodns
];
checkInputs = [ pytest httpretty ]
++ lib.optional (pythonAtLeast "3.5") 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 ];
};
}