diff options
Diffstat (limited to 'pkgs/development/python-modules/msrest/default.nix')
-rw-r--r-- | pkgs/development/python-modules/msrest/default.nix | 69 |
1 files changed, 42 insertions, 27 deletions
diff --git a/pkgs/development/python-modules/msrest/default.nix b/pkgs/development/python-modules/msrest/default.nix index 6eb6e49cdddae..da130f289fda6 100644 --- a/pkgs/development/python-modules/msrest/default.nix +++ b/pkgs/development/python-modules/msrest/default.nix @@ -1,51 +1,66 @@ { lib +, aiodns +, aiohttp , buildPythonPackage -, fetchFromGitHub -, isPy3k -, requests -, requests_oauthlib -, isodate , certifi -, enum34 ? null -, typing -, aiohttp -, aiodns -, pytest +, fetchFromGitHub , httpretty -, mock -, futures ? null +, isodate +, pytest-aiohttp +, pytestCheckHook +, pythonOlder +, requests +, requests-oauthlib , trio }: buildPythonPackage rec { - version = "0.6.21"; pname = "msrest"; + version = "0.6.21"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; - # 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 = "sha256-IlBwlVQ/v+vJmCWNbFZKGL6a9K09z4AYrPm3kwaA/nI="; + hash = "sha256-IlBwlVQ/v+vJmCWNbFZKGL6a9K09z4AYrPm3kwaA/nI="; }; propagatedBuildInputs = [ - requests requests_oauthlib isodate certifi - ] ++ lib.optionals (!isPy3k) [ enum34 typing ] - ++ lib.optionals isPy3k [ aiohttp aiodns ]; + aiodns + aiohttp + certifi + isodate + requests + requests-oauthlib + ]; + + checkInputs = [ + httpretty + pytest-aiohttp + pytestCheckHook + trio + ]; - checkInputs = [ pytest httpretty ] - ++ lib.optionals (!isPy3k) [ mock futures ] - ++ lib.optional isPy3k trio; + disabledTests = [ + # Test require network access + "test_basic_aiohttp" + "test_basic_aiohttp" + "test_basic_async_requests" + "test_basic_async_requests" + "test_conf_async_requests" + "test_conf_async_requests" + "test_conf_async_trio_requests" + ]; - # Deselected tests require network access - checkPhase = '' - pytest tests/ -k "not test_conf_async_trio_requests" - ''; + pythonImportsCheck = [ + "msrest" + ]; meta = with lib; { - description = "The runtime library 'msrest' for AutoRest generated Python clients."; + description = "The runtime library for AutoRest generated Python clients"; homepage = "https://github.com/Azure/msrest-for-python"; license = licenses.mit; maintainers = with maintainers; [ bendlas jonringer maxwilson ]; |