1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
76 lines
1.5 KiB
Nix
76 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
requests,
|
|
requests-toolbelt,
|
|
requests-oauthlib,
|
|
six,
|
|
pytestCheckHook,
|
|
responses,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "flickrapi";
|
|
version = "2.4";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sybrenstuvel";
|
|
repo = "flickrapi";
|
|
rev = "version-${version}";
|
|
hash = "sha256-vRZrlXKI0UDdmDevh3XUngH4X8G3VlOCSP0z/rxhIgw=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace tests/test_tokencache.py \
|
|
--replace-fail "assertEquals" "assertEqual" \
|
|
--replace-fail "assertNotEquals" "assertNotEqual"
|
|
'';
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
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"
|
|
"test_upload"
|
|
];
|
|
|
|
pythonImportsCheck = [ "flickrapi" ];
|
|
|
|
meta = {
|
|
description = "Python interface to the Flickr API";
|
|
homepage = "https://stuvel.eu/flickrapi";
|
|
changelog = "https://github.com/sybrenstuvel/flickrapi/blob/version-${version}/CHANGELOG.md";
|
|
license = lib.licenses.psfl;
|
|
maintainers = with lib.maintainers; [ obadz ];
|
|
};
|
|
}
|