about summary refs log tree commit diff
path: root/pkgs/development/python-modules/msrest
diff options
context:
space:
mode:
authorRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2019-03-19 22:01:54 +0100
committerRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2019-03-19 22:01:54 +0100
commitd338fc15832eb30964cbb322a1d3d0df43809b66 (patch)
tree7e6422076144abe124715fdc4494e3806b24c113 /pkgs/development/python-modules/msrest
parent9dd9769e460228461545f8008820f987e5b7ef27 (diff)
python.pkgs.msrest: fix build on python2
Diffstat (limited to 'pkgs/development/python-modules/msrest')
-rw-r--r--pkgs/development/python-modules/msrest/default.nix14
1 files changed, 9 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/msrest/default.nix b/pkgs/development/python-modules/msrest/default.nix
index bb7f8a9c62dd0..e44d65e5cbe36 100644
--- a/pkgs/development/python-modules/msrest/default.nix
+++ b/pkgs/development/python-modules/msrest/default.nix
@@ -1,15 +1,19 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
-, pythonAtLeast
+, isPy3k
 , requests
 , requests_oauthlib
 , isodate
 , certifi
+, enum34
+, typing
 , aiohttp
 , aiodns
 , pytest
 , httpretty
+, mock
+, futures
 , trio
 }:
 
@@ -28,12 +32,12 @@ buildPythonPackage rec {
 
   propagatedBuildInputs = [
     requests requests_oauthlib isodate certifi
-    # optional
-    aiohttp aiodns
-  ];
+  ] ++ lib.optionals (!isPy3k) [ enum34 typing ]
+    ++ lib.optionals isPy3k [ aiohttp aiodns ];
 
   checkInputs = [ pytest httpretty ]
-    ++ lib.optional (pythonAtLeast "3.5") trio;
+    ++ lib.optionals (!isPy3k) [ mock futures ]
+    ++ lib.optional isPy3k trio;
 
   # Deselected tests require network access
   checkPhase = ''