depot/third_party/nixpkgs/pkgs/development/python-modules/flickrapi/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

67 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
requests,
requests-toolbelt,
requests-oauthlib,
six,
pytestCheckHook,
responses,
pythonOlder,
}:
buildPythonPackage rec {
pname = "flickrapi";
version = "2.4";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "sybrenstuvel";
repo = pname;
rev = "version-${version}";
hash = "sha256-vRZrlXKI0UDdmDevh3XUngH4X8G3VlOCSP0z/rxhIgw=";
};
propagatedBuildInputs = [
requests
requests-toolbelt
requests-oauthlib
six
];
nativeCheckInputs = [
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"
];
pythonImportsCheck = [ "flickrapi" ];
meta = with lib; {
description = "Python interface to the Flickr API";
homepage = "https://stuvel.eu/flickrapi";
license = licenses.psfl;
maintainers = with maintainers; [ obadz ];
};
}