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