Files
nixpkgs/pkgs/development/python-modules/easy-thumbnails/default.nix
T
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
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
2026-01-11 09:34:20 -08:00

75 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
django,
fetchFromGitHub,
fetchpatch,
pillow,
reportlab,
svglib,
pytestCheckHook,
pytest-django,
setuptools,
testfixtures,
}:
buildPythonPackage rec {
pname = "easy-thumbnails";
version = "2.10.0";
pyproject = true;
src = fetchFromGitHub {
owner = "SmileyChris";
repo = "easy-thumbnails";
tag = version;
hash = "sha256-8JTHYQIBbu/4fknK2ZEQeDSgaxKGDfflxumcFMpaGQk=";
};
patches = [
(fetchpatch {
name = "python313-compat.patch";
url = "https://github.com/SmileyChris/easy-thumbnails/pull/650.patch";
hash = "sha256-qD/YnDlDZ7DghLv/mxjQ2o6pSl3fGR+Ipx5NX2BV6zc=";
})
];
build-system = [ setuptools ];
dependencies = [
django
pillow
];
optional-dependencies.svg = [
reportlab
svglib
];
nativeCheckInputs = [
pytestCheckHook
pytest-django
]
++ lib.concatAttrValues optional-dependencies;
checkInputs = [ testfixtures ];
disabledTests = [
# AssertionError: 'ERROR' != 'INFO'
"test_postprocessor"
];
preCheck = ''
export DJANGO_SETTINGS_MODULE="easy_thumbnails.tests.settings"
'';
pythonImportsCheck = [ "easy_thumbnails" ];
meta = {
description = "Easy thumbnails for Django";
homepage = "https://github.com/SmileyChris/easy-thumbnails";
changelog = "https://github.com/SmileyChris/easy-thumbnails/blob/${version}/CHANGES.rst";
license = lib.licenses.bsd3;
maintainers = [ lib.maintainers.onny ];
};
}