git.iko.soy/typeable/nixpkgs
on master help sign in
python.pkgs.msrest: fix build on python2
commitd338fc15832eb30964cbb322a1d3d0df43809b66 authorRobert Schütz <robert.schuetz@stud.uni-heidelberg.de> dateTue 19 Mar 2019, 22:01 (8 years ago) parent9dd9769
1 file changed+9−5
pkgs/development/python-modules/msrest/default.nix+9−5
pkgs/development/python-modules/msrest/default.nix+9−5
@@ -1,15 +1,19 @@
11{ lib
22, buildPythonPackage
33, fetchFromGitHub
4−, pythonAtLeast
4+, isPy3k
55, requests
66, requests_oauthlib
77, isodate
88, certifi
9+, enum34
10+, typing
911, aiohttp
1012, aiodns
1113, pytest
1214, httpretty
15+, mock
16+, futures
1317, trio
1418}:
1519
@@ -28,12 +32,12 @@ buildPythonPackage rec {
2832
2933 propagatedBuildInputs = [
3034 requests requests_oauthlib isodate certifi
31− # optional
32− aiohttp aiodns
33− ];
35+ ] ++ lib.optionals (!isPy3k) [ enum34 typing ]
36+ ++ lib.optionals isPy3k [ aiohttp aiodns ];
3437
3538 checkInputs = [ pytest httpretty ]
36− ++ lib.optional (pythonAtLeast "3.5") trio;
39+ ++ lib.optionals (!isPy3k) [ mock futures ]
40+ ++ lib.optional isPy3k trio;
3741
3842 # Deselected tests require network access
3943 checkPhase = ''