3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/msrest/default.nix

54 lines
1.2 KiB
Nix
Raw Normal View History

2019-03-19 14:58:12 +00:00
{ lib
2018-12-19 23:06:57 +00:00
, buildPythonPackage
2019-05-21 19:12:38 +01:00
, fetchFromGitHub
, isPy3k
2019-03-19 14:58:12 +00:00
, requests
2018-12-19 23:06:57 +00:00
, requests_oauthlib
, isodate
2019-03-19 14:58:12 +00:00
, certifi
, enum34
, typing
2019-03-19 14:58:12 +00:00
, aiohttp
, aiodns
, pytest
, httpretty
, mock
, futures
, trio
2018-12-19 23:06:57 +00:00
}:
buildPythonPackage rec {
2019-08-02 16:20:14 +01:00
version = "0.6.9";
2018-12-19 23:06:57 +00:00
pname = "msrest";
2019-05-21 19:12:38 +01:00
# 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}";
2019-08-02 16:20:14 +01:00
sha256 = "0540dmxz90jsmwvd4q06cr1ficixknjk8q06f2dqcp06w92vnl8r";
2018-12-19 23:06:57 +00:00
};
2019-03-19 14:58:12 +00:00
propagatedBuildInputs = [
requests requests_oauthlib isodate certifi
] ++ lib.optionals (!isPy3k) [ enum34 typing ]
++ lib.optionals isPy3k [ aiohttp aiodns ];
2019-03-19 14:58:12 +00:00
checkInputs = [ pytest httpretty ]
++ lib.optionals (!isPy3k) [ mock futures ]
++ lib.optional isPy3k trio;
2019-03-19 14:58:12 +00:00
# Deselected tests require network access
2019-03-19 14:58:12 +00:00
checkPhase = ''
pytest tests/ -k "not test_conf_async_trio_requests"
2019-03-19 14:58:12 +00:00
'';
2018-12-19 23:06:57 +00:00
2019-03-19 14:58:12 +00:00
meta = with lib; {
2018-12-19 23:06:57 +00:00
description = "The runtime library 'msrest' for AutoRest generated Python clients.";
2019-05-21 19:12:38 +01:00
homepage = https://github.com/Azure/msrest-for-python;
2018-12-19 23:06:57 +00:00
license = licenses.mit;
2019-05-21 19:12:38 +01:00
maintainers = with maintainers; [ bendlas jonringer mwilsoninsight ];
2018-12-19 23:06:57 +00:00
};
}