python313Packages.publicsuffixlist: 1.0.2.20250122 -> 1.0.2.20250124 (#376319)
[NixPkgs.git] / pkgs / development / python-modules / flickrapi / default.nix
blob9bbd11bd65b6b5a1a604beafb57e09efbee9c639
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   requests,
6   requests-toolbelt,
7   requests-oauthlib,
8   six,
9   pytestCheckHook,
10   responses,
11   pythonOlder,
12   setuptools,
15 buildPythonPackage rec {
16   pname = "flickrapi";
17   version = "2.4";
18   pyproject = true;
20   disabled = pythonOlder "3.7";
22   src = fetchFromGitHub {
23     owner = "sybrenstuvel";
24     repo = "flickrapi";
25     rev = "version-${version}";
26     hash = "sha256-vRZrlXKI0UDdmDevh3XUngH4X8G3VlOCSP0z/rxhIgw=";
27   };
29   postPatch = ''
30     substituteInPlace tests/test_tokencache.py \
31       --replace-fail "assertEquals" "assertEqual" \
32       --replace-fail "assertNotEquals" "assertNotEqual"
33   '';
35   build-system = [ setuptools ];
37   dependencies = [
38     requests
39     requests-toolbelt
40     requests-oauthlib
41     six
42   ];
44   nativeCheckInputs = [
45     pytestCheckHook
46     responses
47   ];
49   preCheck = ''
50     export HOME=$(mktemp -d);
51   '';
53   disabledTests = [
54     # Tests require network access
55     "test_default_format"
56     "test_etree_default_format"
57     "test_etree_format_error"
58     "test_etree_format_happy"
59     "test_explicit_format"
60     "test_json_callback_format"
61     "test_json_format"
62     "test_parsed_json_format"
63     "test_walk"
64     "test_xmlnode_format"
65     "test_xmlnode_format_error"
66   ];
68   pythonImportsCheck = [ "flickrapi" ];
70   meta = with lib; {
71     description = "Python interface to the Flickr API";
72     homepage = "https://stuvel.eu/flickrapi";
73     changelog = "https://github.com/sybrenstuvel/flickrapi/blob/version-${version}/CHANGELOG.md";
74     license = licenses.psfl;
75     maintainers = with maintainers; [ obadz ];
76   };