From 098b0771f3e9114befac97139d10e550c8e26af1 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sat, 18 Jul 2026 16:48:01 +0000 Subject: [PATCH] python3Packages.albucore: 0.0.24 -> 0.2.4 Diff: https://github.com/albumentations-team/albucore/compare/0.0.24...0.2.4 Changelog: https://github.com/albumentations-team/albucore/releases/tag/0.2.4 --- .../python-modules/albucore/default.nix | 54 ++++++++++--------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/pkgs/development/python-modules/albucore/default.nix b/pkgs/development/python-modules/albucore/default.nix index 8000174085d1..7158b48c67a6 100644 --- a/pkgs/development/python-modules/albucore/default.nix +++ b/pkgs/development/python-modules/albucore/default.nix @@ -2,57 +2,63 @@ lib, buildPythonPackage, fetchFromGitHub, - setuptools, - pytestCheckHook, + + # build-system + hatchling, + + # dependencies + numkong, numpy, opencv-python, - simsimd, stringzilla, + + # tests + hypothesis, + pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "albucore"; - version = "0.0.24"; + version = "0.2.4"; pyproject = true; + __structuredAttrs = true; src = fetchFromGitHub { owner = "albumentations-team"; repo = "albucore"; - tag = version; - hash = "sha256-frVMPW3au/6vPRY89GIt7chCPkUMl13DpPqCPqIjz/o="; + tag = finalAttrs.version; + hash = "sha256-gI6q9ODkc2JoDfV8RA2NzwbC9A6QyZFa7C24prqMydU="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace-fail \ - 'from pkg_resources import DistributionNotFound, get_distribution' \ - 'from importlib.metadata import PackageNotFoundError as DistributionNotFound, distribution as get_distribution' - ''; - - pythonRelaxDeps = [ "opencv-python" ]; - - build-system = [ setuptools ]; + build-system = [ + hatchling + ]; dependencies = [ + numkong numpy opencv-python - simsimd stringzilla ]; pythonImportsCheck = [ "albucore" ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + hypothesis + pytestCheckHook + ]; - # albumentations doesn't support newer versions of albucore - # and has been archived upstream in favor of relicensed `albumentationsx` - passthru.skipBulkUpdate = true; + disabledTests = [ + # Flaky on some CPUs: + # AssertionError: Not equal to tolerance rtol=1e-05, atol=1e-05 + "test_normalize_consistency_across_shapes" + ]; meta = { description = "High-performance image processing library to optimize and extend Albumentations with specialized functions for image transformations"; homepage = "https://github.com/albumentations-team/albucore"; - changelog = "https://github.com/albumentations-team/albucore/releases/tag/${version}"; + changelog = "https://github.com/albumentations-team/albucore/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ bcdarwin ]; }; -} +})