1{ 2 lib, 3 buildPythonPackage, 4 django, 5 fetchFromGitHub, 6 fetchpatch, 7 pillow, 8 pythonOlder, 9 reportlab, 10 svglib, 11 pytestCheckHook, 12 pytest-django, 13 setuptools, 14 testfixtures, 15}: 16 17buildPythonPackage rec { 18 pname = "easy-thumbnails"; 19 version = "2.10.0"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.9"; 23 24 src = fetchFromGitHub { 25 owner = "SmileyChris"; 26 repo = "easy-thumbnails"; 27 tag = version; 28 hash = "sha256-8JTHYQIBbu/4fknK2ZEQeDSgaxKGDfflxumcFMpaGQk="; 29 }; 30 31 patches = [ 32 (fetchpatch { 33 name = "python313-compat.patch"; 34 url = "https://github.com/SmileyChris/easy-thumbnails/pull/650.patch"; 35 hash = "sha256-qD/YnDlDZ7DghLv/mxjQ2o6pSl3fGR+Ipx5NX2BV6zc="; 36 }) 37 ]; 38 39 build-system = [ setuptools ]; 40 41 dependencies = [ 42 django 43 pillow 44 reportlab 45 svglib 46 ]; 47 48 nativeCheckInputs = [ 49 pytestCheckHook 50 pytest-django 51 ]; 52 53 checkInputs = [ testfixtures ]; 54 55 disabledTests = [ 56 # AssertionError: 'ERROR' != 'INFO' 57 "test_postprocessor" 58 ]; 59 60 preCheck = '' 61 export DJANGO_SETTINGS_MODULE="easy_thumbnails.tests.settings" 62 ''; 63 64 pythonImportsCheck = [ "easy_thumbnails" ]; 65 66 meta = { 67 description = "Easy thumbnails for Django"; 68 homepage = "https://github.com/SmileyChris/easy-thumbnails"; 69 changelog = "https://github.com/SmileyChris/easy-thumbnails/blob/${version}/CHANGES.rst"; 70 license = lib.licenses.bsd3; 71 maintainers = [ lib.maintainers.onny ]; 72 }; 73}