@@ -1,6 +1,7 @@
11{ lib
22, buildPythonPackage
33, fetchFromGitHub
4+, pythonAtLeast
45, requests
56, requests_oauthlib
67, isodate
@@ -9,17 +10,15 @@
910, aiodns
1011, pytest
1112, httpretty
13+, trio
1214}:
1315
1416buildPythonPackage rec {
1517 version = "0.6.4";
1618 pname = "msrest";
1719
18− #src = fetchPypi {
19− # inherit pname version;
20− # sha256 = "5dadd54bec98d52cd9f43fb095015c346135b8cafaa35f24c7309cc25d3ad266";
21− #};
22−
20+ # no tests in PyPI tarball
21+ # see https://github.com/Azure/msrest-for-python/pull/152
2322 src = fetchFromGitHub {
2423 owner = "Azure";
2524 repo = "msrest-for-python";
@@ -33,10 +32,12 @@ buildPythonPackage rec {
3332 aiohttp aiodns
3433 ];
3534
36− checkInputs = [ pytest httpretty ];
35+ checkInputs = [ pytest httpretty ]
36+ ++ lib.optional (pythonAtLeast "3.5") trio;
3737
38+ # Deselected tests require network access
3839 checkPhase = ''
39− pytest tests/
40+ pytest tests/ -k "not test_conf_async_trio_requests"
4041 '';
4142
4243 meta = with lib; {