From patchwork Mon Feb 17 00:00:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 38762 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3651E27BBE9; Mon, 17 Feb 2025 00:02:56 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 233AE27BBE2 for ; Mon, 17 Feb 2025 00:02:54 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tjoaf-0004Eg-2A; Sun, 16 Feb 2025 19:02:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tjoaN-0004B6-Vq for guix-patches@gnu.org; Sun, 16 Feb 2025 19:02:09 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tjoaJ-0001mV-6Y for guix-patches@gnu.org; Sun, 16 Feb 2025 19:02:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=1gSTlMInr7VdkA/Fiizirj3BDrNIHKyRTSJx0gxrpio=; b=kRxkkzfYyn77Wh1v8Zhy+crp2s/rjfbXcAUfusxbRVjyU/I5b8Yz0yOX1mAziVvGqEPtgKVgCHZ2zGCLzaR/oXJRb3V7c7/RZlm4/5gPFVSUMO8mCQknlnsRElZ9XRONjXkYTP2Uwv4chg2tiY52PLhwEN3Zsoh4Vm5a7j25gAO43YCRtTQeu7m2GO/jD2LujyUeu8ulSlTBonlZqgYV6CMRabquge4N0xTSNPQBjnEzM1+PlLl6MOUBGeex7FvA+B8kxpHnOh8YsymgDYhTWsX7SLNqxj6ru+K3Sr9LBEN6Z6Y3T4o//hDAsNkRLX6ocP07kodh0Yth42ElTzaYfA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tjoaJ-0000ed-1r for guix-patches@gnu.org; Sun, 16 Feb 2025 19:02:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76354] [PATCH v2] gnu: Add python-imageio-freeimage. References: <0a6be0beacf3a8eab021bb32670e02ccf520f038.1739748428.git.monego@posteo.net> In-Reply-To: <0a6be0beacf3a8eab021bb32670e02ccf520f038.1739748428.git.monego@posteo.net> Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Feb 2025 00:02:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76354 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76354@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 76354-submit@debbugs.gnu.org id=B76354.17397504632263 (code B ref 76354); Mon, 17 Feb 2025 00:02:03 +0000 Received: (at 76354) by debbugs.gnu.org; 17 Feb 2025 00:01:03 +0000 Received: from localhost ([127.0.0.1]:39208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjoZE-0000ZJ-40 for submit@debbugs.gnu.org; Sun, 16 Feb 2025 19:01:03 -0500 Received: from mout01.posteo.de ([185.67.36.65]:59663) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjoZ9-0000YR-Dc for 76354@debbugs.gnu.org; Sun, 16 Feb 2025 19:00:53 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id CBCAD240028 for <76354@debbugs.gnu.org>; Mon, 17 Feb 2025 01:00:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1739750442; bh=bReDi4+FLHrSJ8CmN5b2DvQGBWYIX25gCijIvv27pMc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=fI/sn2ceTEDMF3pwBL7FCGkeKEyfKrK74NzQXwzs916Li8PDfAlLoWjOyOk+6kcXx wYDXY5s6LkK81IvFii5Ek4qSMAQqLxdxtK+9Q5P9nTKEEnhDWyofMd23Lt0yOdJIK2 87YOIZcZ7uafobdJIXZo0r55hVJcVbfGReBPEXQ4cw/36+ILTB7UjB39cVhIT09LZa L4XMvBLRbMt4id4worCX2qftTOehTDdBEpv6n4Eb8cHoZdRr+pGVZ3ZIGRHJyqS7tn VsOl+KXa+79kA+0/yhlbZ/tdb75SjTn5EgYShH0+LBwvAc/Irea0qX1OlDdFP99b9A S0FS4Ql5H88Yg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Yx2qF3WS4z6v0F; Mon, 17 Feb 2025 01:00:41 +0100 (CET) From: Vinicius Monego Date: Mon, 17 Feb 2025 00:00:35 +0000 Message-ID: <22439888825192df60e3ae5b34c302a685d231eb.1739750350.git.monego@posteo.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm (python-imageio-freeimage): New variable. (python-imageio)[arguments]: Remove the freeimage substitution from the 'fix-source phase. [inputs]: Remove freeimage. Change-Id: I842998baea1568e1d9d1328e4387d14867bd3bb2 --- Fixed license list. No other changes. gnu/packages/python-xyz.scm | 53 +++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 8 deletions(-) base-commit: b4dc8eb4adff9d824ff7df704e134964b3b47396 diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index bb0ab777d5..d59cedb179 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -80,7 +80,7 @@ ;;; Copyright © 2020 Josh Holland ;;; Copyright © 2020 Yuval Kogman ;;; Copyright © 2020, 2022 Michael Rohleder -;;; Copyright © 2020, 2021, 2022, 2023, 2024 Vinicius Monego +;;; Copyright © 2020, 2021, 2022, 2023, 2024, 2025 Vinicius Monego ;;; Copyright © 2020 Guy Fleury Iteriteka ;;; Copyright © 2020 Hendursaga ;;; Copyright © 2020 Malte Frank Gerdes @@ -11892,6 +11892,50 @@ (define-public python-imageio-ffmpeg from FFMPEG, reliably terminating the process when done.") (license license:bsd-2))) +(define-public python-imageio-freeimage + (package + (name "python-imageio-freeimage") + (version "0.1.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "imageio_freeimage" version)) + (sha256 + (base32 "1la0iv3617m52dnidhhrdaz9dpnlfqs7b83550d3jkjavv30md72")))) + (build-system pyproject-build-system) + (arguments + (list + #:tests? #f ; tests need internet and are not distributed in PyPI + #:phases + #~(modify-phases %standard-phases + ;; imageio_freeimage expects a copy of the library in its source + ;; tree. Changing this would require hacky substitutions. + (add-after 'install 'freeimage-path + (lambda* (#:key inputs #:allow-other-keys) + (let* ((pylib (string-append #$output "/lib/python" + #$(version-major+minor + (package-version python)) + "/site-packages")) + (iofi (string-append pylib "/imageio_freeimage"))) + (mkdir-p (string-append iofi "/_lib")) + (symlink (search-input-file inputs "lib/libfreeimage.so") + (string-append iofi "/_lib/libfreeimage.so")))))))) + (native-inputs (list python-poetry-core python-requests python-setuptools + python-wheel)) + (inputs (list freeimage)) + (propagated-inputs (list python-imageio)) + (home-page "https://github.com/imageio/imageio-freeimage") + (synopsis "Plugin for ImageIO that wraps the FreeImage library") + (description + "This package provides a plugin for @code{ImageIO} that wraps the +@code{FreeImage} library.") + ;; As a derivative work of FreeImage, imageio_freeimage is licensed under + ;; GPLv2 or GPLv3, and the FreeImage Public License (FIPL). + ;; For more information, see the LICENSE file. + (license + (list license:gpl2 license:gpl3 + (license:non-copyleft "https://spdx.org/licenses/FreeImage.html"))))) + (define-public python-imageio (package (name "python-imageio") @@ -11911,12 +11955,6 @@ (define-public python-imageio #~(modify-phases %standard-phases (add-after 'unpack 'fix-source (lambda* (#:key inputs #:allow-other-keys) - (substitute* "imageio/plugins/_freeimage.py" - (("os\\.getenv\\(\"IMAGEIO_FREEIMAGE_LIB\".*\\)" all) - (string-append - "(" all " or \"" - (search-input-file inputs "lib/libfreeimage.so") - "\")"))) (substitute* "imageio/core/util.py" (("\"/var/tmp\"") "os.getenv(\"TMPDIR\", \"/tmp\")")))) @@ -11927,7 +11965,6 @@ (define-public python-imageio all fun args) (string-append "raises(ValueError, " fun ", " args ")"))) (delete-file "tests/test_freeimage.py")))))) - (inputs (list freeimage)) (propagated-inputs (list python-imageio-ffmpeg python-numpy python-pillow python-tifffile)) (native-inputs