1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 requests, 6 requests-toolbelt, 7 requests-oauthlib, 8 six, 9 pytestCheckHook, 10 responses, 11 pythonOlder, 12}: 13 14buildPythonPackage rec { 15 pname = "flickrapi"; 16 version = "2.4"; 17 format = "setuptools"; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "sybrenstuvel"; 23 repo = pname; 24 rev = "version-${version}"; 25 hash = "sha256-vRZrlXKI0UDdmDevh3XUngH4X8G3VlOCSP0z/rxhIgw="; 26 }; 27 28 propagatedBuildInputs = [ 29 requests 30 requests-toolbelt 31 requests-oauthlib 32 six 33 ]; 34 35 nativeCheckInputs = [ 36 pytestCheckHook 37 responses 38 ]; 39 40 preCheck = '' 41 export HOME=$(mktemp -d); 42 ''; 43 44 disabledTests = [ 45 # Tests require network access 46 "test_default_format" 47 "test_etree_default_format" 48 "test_etree_format_error" 49 "test_etree_format_happy" 50 "test_explicit_format" 51 "test_json_callback_format" 52 "test_json_format" 53 "test_parsed_json_format" 54 "test_walk" 55 "test_xmlnode_format" 56 "test_xmlnode_format_error" 57 ]; 58 59 pythonImportsCheck = [ "flickrapi" ]; 60 61 meta = with lib; { 62 description = "A Python interface to the Flickr API"; 63 homepage = "https://stuvel.eu/flickrapi"; 64 license = licenses.psfl; 65 maintainers = with maintainers; [ obadz ]; 66 }; 67}