2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-04-27 09:35:20 +00:00
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, requests
|
2021-07-24 12:14:16 +00:00
|
|
|
, requests-toolbelt
|
2022-04-27 09:35:20 +00:00
|
|
|
, requests-oauthlib
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, responses
|
2022-04-27 09:35:20 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-04-27 09:35:20 +00:00
|
|
|
pname = "flickrapi";
|
|
|
|
version = "2.4";
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sybrenstuvel";
|
|
|
|
repo = pname;
|
|
|
|
rev = "version-${version}";
|
|
|
|
hash = "sha256-vRZrlXKI0UDdmDevh3XUngH4X8G3VlOCSP0z/rxhIgw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
requests-toolbelt
|
|
|
|
requests-oauthlib
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
responses
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d);
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests require network access
|
|
|
|
"test_default_format"
|
|
|
|
"test_etree_default_format"
|
|
|
|
"test_etree_format_error"
|
|
|
|
"test_etree_format_happy"
|
|
|
|
"test_explicit_format"
|
|
|
|
"test_json_callback_format"
|
|
|
|
"test_json_format"
|
|
|
|
"test_parsed_json_format"
|
|
|
|
"test_walk"
|
|
|
|
"test_xmlnode_format"
|
|
|
|
"test_xmlnode_format_error"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"flickrapi"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A Python interface to the Flickr API";
|
2022-04-27 09:35:20 +00:00
|
|
|
homepage = "https://stuvel.eu/flickrapi";
|
|
|
|
license = licenses.psfl;
|
|
|
|
maintainers = with maintainers; [ obadz ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|