1{ lib 2, buildPythonPackage 3, fetchPypi 4, tornado 5, requests 6, httplib2 7, sure 8, nose 9, nose-exclude 10, coverage 11, rednose 12, nose-randomly 13, six 14, mock 15}: 16 17buildPythonPackage rec { 18 pname = "httpretty"; 19 version = "0.9.7"; 20 21 # drop this for version > 0.9.7 22 # Flaky tests: https://github.com/gabrielfalcao/HTTPretty/pull/394 23 doCheck = lib.versionAtLeast version "0.9.8"; 24 25 src = fetchPypi { 26 inherit pname version; 27 sha256 = "66216f26b9d2c52e81808f3e674a6fb65d4bf719721394a1a9be926177e55fbe"; 28 }; 29 30 propagatedBuildInputs = [ six ]; 31 32 checkInputs = [ nose sure coverage mock rednose 33 # Following not declared in setup.py 34 nose-randomly requests tornado httplib2 nose-exclude 35 ]; 36 37 __darwinAllowLocalNetworking = true; 38 39 # Those flaky tests are failing intermittently on all platforms 40 NOSE_EXCLUDE = lib.concatStringsSep "," [ 41 "tests.functional.test_httplib2.test_callback_response" 42 "tests.functional.test_requests.test_streaming_responses" 43 "tests.functional.test_httplib2.test_callback_response" 44 "tests.functional.test_requests.test_httpretty_should_allow_adding_and_overwritting_by_kwargs_u2" 45 ]; 46 47 meta = with lib; { 48 homepage = "https://httpretty.readthedocs.org/"; 49 description = "HTTP client request mocking tool"; 50 license = licenses.mit; 51 }; 52}