Skip to content

Commit

Permalink
python312Packages.pypillowfight: 0.3.0 -> 0.3.0-unstable-2024-07-07, …
Browse files Browse the repository at this point in the history
…modernize and remove nose

Updates to a recent commit that removes nose in favor of pytest. Also
includes a few misc improvements made upstream.
  • Loading branch information
pyrox0 committed Jul 19, 2024
1 parent 01f0006 commit c9e3709
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions pkgs/development/python-modules/pypillowfight/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,39 @@
lib,
buildPythonPackage,
fetchFromGitLab,
nose,
pillow,
isPy3k,
isPyPy,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "pypillowfight";
version = "0.3.0";
format = "setuptools";
version = "0.3.0-unstable-2024-07-07";
pyproject = true;

src = fetchFromGitLab {
domain = "gitlab.gnome.org";
group = "World";
owner = "OpenPaperwork";
repo = "libpillowfight";
rev = version;
sha256 = "096242v425mlqqj5g1giy59p7grxp05g78w6bk37vzph98jrgv3w";
# Currently no tagged release past 0.3.0 and we need these patches to fix Python 3.12 compat
rev = "4d5f739b725530cd61e709071d31e9f707c64bd6";
hash = "sha256-o5FzUSDq0lwkXGXRMsS5NB/Mp4Ie833wkxKPziR23f4=";
};

prePatch = ''
echo '#define INTERNAL_PILLOWFIGHT_VERSION "${version}"' > src/pillowfight/_version.h
'';

# Disable tests because they're designed to only work on Debian:
# https://github.com/jflesch/libpillowfight/issues/2#issuecomment-268259174
doCheck = false;
build-system = [ setuptools ];

# Python 2.x is not supported, see:
# https://github.com/jflesch/libpillowfight/issues/1
disabled = !isPy3k && !isPyPy;
dependencies = [ pillow ];

# This is needed by setup.py regardless of whether tests are enabled.
buildInputs = [ nose ];
propagatedBuildInputs = [ pillow ];
nativeCheckInputs = [ pytestCheckHook ];

meta = with lib; {
meta = {
description = "Library containing various image processing algorithms";
inherit (src.meta) homepage;
license = licenses.gpl3Plus;
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ pyrox0 ];
};
}

0 comments on commit c9e3709

Please sign in to comment.