GNU bug report logs - #76354
[PATCH] gnu: Add python-imageio-freeimage.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Vinicius Monego <monego@HIDDEN>; Keywords: patch; dated Sun, 16 Feb 2025 23:44:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 76354 <at> debbugs.gnu.org:


Received: (at 76354) by debbugs.gnu.org; 7 Apr 2025 11:30:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 07 07:30:10 2025
Received: from localhost ([127.0.0.1]:53048 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u1kg5-0007cO-Hf
	for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 07:30:10 -0400
Received: from mout02.posteo.de ([185.67.36.66]:42293)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monego@HIDDEN>) id 1u1kg3-0007Jk-1q
 for 76354 <at> debbugs.gnu.org; Mon, 07 Apr 2025 07:30:07 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 21586240104
 for <76354 <at> debbugs.gnu.org>; Mon,  7 Apr 2025 13:29:58 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1744025398; bh=ww4jvIDxA4dp0DdE4D85amBne3tyi6ROcrRGXQq7pTo=;
 h=Message-ID:Date:MIME-Version:To:Subject:From:Content-Type:
 Content-Transfer-Encoding:From;
 b=WbtQhbkUarY2hNIO+c5ZIr0R1412AXu0d/e3E69kCg5xWpz/nOmINSKTtQVj6e7cp
 uEDiQlWe0k2Yl8kd+XBfRUA+4vmNKKqeYqnntkdxfCUgXH4KebXQanSO8LWdrXUWqv
 go5kpz5i7uvKTWBO0EV3CXBZ/qmqREfOk0+yCXo0cbBBov5UlBn6YE5VMHJAwo1mDS
 1cwIbvoaYmXUaol7lQaFBZeApFa16gH6odk8eMFs7tTpEmg4bcdm5C0BHySRkhpBLH
 u+ZyW2oCF5AYk0oF5cUpnb2D7mX/jthOf26vVGO7+KY/kNQprdklwkUe4gaHeb6Avn
 W5BKuhSfhFXlw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4ZWRnv4kJNz9rxS;
 Mon,  7 Apr 2025 13:29:55 +0200 (CEST)
Message-ID: <34c6fd99-1009-4eb5-898b-0adb2b9ab05b@HIDDEN>
Date: Mon,  7 Apr 2025 11:29:53 +0000
MIME-Version: 1.0
To: 76354 <at> debbugs.gnu.org, lars@HIDDEN, tanguy@HIDDEN,
 me@HIDDEN, Sharlatan Hellseher <sharlatanus@HIDDEN>
Subject: [PATCH] gnu: Add python-imageio-freeimage.
Content-Language: en-US
From: Vinicius Monego <monego@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76354
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello,

Maybe this v3 can be pushed to python-team along with a version update 
to python-imageio and python-scikit-image? cc python-team

I couldn't apply all suggestions, but maybe someone else could try to 
improve the package. QA also did not pick up this issue apparently.

Vinicius





Information forwarded to guix-patches@HIDDEN:
bug#76354; Package guix-patches. Full text available.

Message received at 76354 <at> debbugs.gnu.org:


Received: (at 76354) by debbugs.gnu.org; 2 Mar 2025 00:36:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 01 19:36:24 2025
Received: from localhost ([127.0.0.1]:47220 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1toXJf-00075h-UP
	for submit <at> debbugs.gnu.org; Sat, 01 Mar 2025 19:36:24 -0500
Received: from mout01.posteo.de ([185.67.36.65]:41301)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monego@HIDDEN>) id 1toXJe-00074w-4L
 for 76354 <at> debbugs.gnu.org; Sat, 01 Mar 2025 19:36:22 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id D039D240027
 for <76354 <at> debbugs.gnu.org>; Sun,  2 Mar 2025 01:36:14 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1740875774; bh=N6pNyLpCSsJt6kSuYCYA5Sy3czW/tPecuaquWdu8i9M=;
 h=Content-Type:Message-ID:Date:MIME-Version:To:From:Subject:From;
 b=dBzmGcLzqga2+gib+9NOBRS+kUL9ICCLRpKAEoQ+JgFLrQcHTB4C2I/QWTlmV4toR
 woEpOpwyealXzxDL4ydzYBuBRjXkJPIqBaKuTdbCGtjr3dcXbKOMrUxtyPhX+o5L1a
 NSrVXAguK5OVanHCzL+CRhyqvo5RGkuIO2+PoON5MBE+CXvEXDtHvH1p7/YIEi/D32
 odS43uvFnpIxXDM2z1GRyLNbcqtBvHiP7/4rMLkeR3tYA5zeSmZtGpzeWRhVFwCjbj
 IwbI8Wds27Fty3kV4IvTnj/FN6J35l3Njq3Sy/XQ0+b3tVKQQRi4Nzl1xPOv2PzJQW
 rACL6kkDBmMnQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Z530F404Wz9rxK;
 Sun,  2 Mar 2025 01:36:13 +0100 (CET)
Content-Type: multipart/alternative;
 boundary="------------yO7jfKD7lqCsAiGDbyNe00AE"
Message-ID: <5c64e05c-8de5-4ecc-a0bc-651f4a95ae3c@HIDDEN>
Date: Sun,  2 Mar 2025 00:36:11 +0000
MIME-Version: 1.0
To: 76354 <at> debbugs.gnu.org, Sharlatan Hellseher <sharlatanus@HIDDEN>
Content-Language: en-US
From: Vinicius Monego <monego@HIDDEN>
Subject: Re: [PATCH] gnu: Add python-imageio-freeimage.
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76354
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

This is a multi-part message in MIME format.
--------------yO7jfKD7lqCsAiGDbyNe00AE
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

> It looks the whole [arguments] block may be removed and skip test
> logic applied in #:test-flags as the package uses python-pytest e.g.
> "--ignore=tests/test_freeimage.py" or "-k not <test-name>".

Done, but I had to keep the TMPDIR substitution.

> Maybe install from Git?
> https://github.com/imageio/imageio-freeimage/blob/master/tests/test_freeimage.py
> the only one tests file which does not require urllib or requrests.

I tried, but most tests run imageio's downloader under the hood. IIRC 
only 2 tests pass by default. Then I got to a point where some tests 
pass in the build environment preserved by -K but still don't pass in 
the build run. I eventually gave up on it as a few other tests were 
still failing.

> Maybe swap to #$(this-package-input "<package>") instead?
Wasn't search-input-file preferred to not break package transformation? 
I skipped this change in v3.

Vinicius

--------------yO7jfKD7lqCsAiGDbyNe00AE
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</p>
    <blockquote type="cite">It looks the whole [arguments] block may be
      removed and skip test
      <div class="line" id="2-lineno15">logic applied in #:test-flags as
        the package uses python-pytest e.g.</div>
      <div class="line" id="2-lineno16">"--ignore=tests/test_freeimage.py"
        or "-k not &lt;test-name&gt;".</div>
    </blockquote>
    <p>Done, but I had to keep the TMPDIR substitution.</p>
    <p>
      <blockquote type="cite">Maybe install from Git?
        <div class="line" id="2-lineno22"><a
href="https://github.com/imageio/imageio-freeimage/blob/master/tests/test_freeimage.py"
            class="moz-txt-link-freetext">https://github.com/imageio/imageio-freeimage/blob/master/tests/test_freeimage.py</a></div>
        <div class="line" id="2-lineno23">the only one tests file which
          does not require urllib or requrests.</div>
      </blockquote>
    </p>
    <p>I tried, but most tests run imageio's downloader under the hood.
      IIRC only 2 tests pass by default. Then I got to a point where
      some tests pass in the build environment preserved by -K but still
      don't pass in the build run. I eventually gave up on it as a few
      other tests were still failing.<br>
    </p>
    <p>
      <blockquote type="cite">Maybe swap to #$(this-package-input
        "&lt;package&gt;") instead?</blockquote>
      Wasn't search-input-file preferred to not break package
      transformation? I skipped this change in v3.</p>
    <p>Vinicius<br>
    </p>
  </body>
</html>

--------------yO7jfKD7lqCsAiGDbyNe00AE--




Information forwarded to guix-patches@HIDDEN:
bug#76354; Package guix-patches. Full text available.

Message received at 76354 <at> debbugs.gnu.org:


Received: (at 76354) by debbugs.gnu.org; 2 Mar 2025 00:35:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 01 19:35:50 2025
Received: from localhost ([127.0.0.1]:47214 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1toXJ8-00073i-5p
	for submit <at> debbugs.gnu.org; Sat, 01 Mar 2025 19:35:50 -0500
Received: from mout02.posteo.de ([185.67.36.66]:40443)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monego@HIDDEN>) id 1toXJ4-00072w-IA
 for 76354 <at> debbugs.gnu.org; Sat, 01 Mar 2025 19:35:47 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id E4769240101
 for <76354 <at> debbugs.gnu.org>; Sun,  2 Mar 2025 01:35:38 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1740875738; bh=tlK4CpC9WNSIEL9TA/puDCn0ZDkTLkYholP/gQ0TGjY=;
 h=Content-Type:Message-ID:Date:MIME-Version:To:From:Subject:From;
 b=pwyc2P6vJUEgHzSRr4TsTPSpDDWEHk6q2D0csC301abSfpQbITY7pnvLaVxVFkxRJ
 A6fzcb/RjMIY1LtFWn7tQWPMXqElcgG7ApdAHUk33i9klcFSj1e/3kxVUQ8WKF6Z7h
 zoh1S7Frgy1X8znCLZeQTcPPsQ5316yLfwyvTP++AIgsMlD1mJHxbcOcBUrPf1BrG/
 emyprJAItIswKEWgcmkA3DW2xG7nCApEkc8CLYdFVf4nuo6C5Y7l3PnBiKC1wbyg5F
 2M+d01nejT2aVKZMV7YH4t/d+eUT9W+VfbqxDL2Ne752oJhfxX4/BGyNYOsAYQ7ISJ
 F8pblChY2rNCQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Z52zY5ZqKz9rxB;
 Sun,  2 Mar 2025 01:35:37 +0100 (CET)
Content-Type: multipart/alternative;
 boundary="------------n2PxZLoJP8aNrhFEHDJFknyo"
Message-ID: <160ad832-f82e-4dd9-9315-1e6c04ab0983@HIDDEN>
Date: Sun,  2 Mar 2025 00:35:34 +0000
MIME-Version: 1.0
To: 76354 <at> debbugs.gnu.org, Sharlatan Hellseher <sharlatanus@HIDDEN>
Content-Language: en-US
From: Vinicius Monego <monego@HIDDEN>
Subject: Re: [PATCH] gnu: Add python-imageio-freeimage.
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76354
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

This is a multi-part message in MIME format.
--------------n2PxZLoJP8aNrhFEHDJFknyo
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

> It looks the whole [arguments] block may be removed and skip test
> logic applied in #:test-flags as the package uses python-pytest e.g.
> "--ignore=tests/test_freeimage.py" or "-k not <test-name>".

Done, but I had to keep the TMPDIR substitution.

> Maybe install from Git?
> https://github.com/imageio/imageio-freeimage/blob/master/tests/test_freeimage.py
> the only one tests file which does not require urllib or requrests.

I tried, but most tests run imageio's downloader under the hood. IIRC 
only 2 tests pass by default. Then I got to a point where some tests 
pass in the build environment preserved by -K but still don't pass in 
the build run. I eventually gave up on it as a few other tests were 
still failing.

> Maybe swap to #$(this-package-input "<package>") instead?
Wasn't search-input-file preferred to not break package transformation? 
I skipped this change in v3.

--------------n2PxZLoJP8aNrhFEHDJFknyo
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</p>
    <blockquote type="cite">It looks the whole [arguments] block may be
      removed and skip test
      <div class="line" id="2-lineno15">logic applied in #:test-flags as
        the package uses python-pytest e.g.</div>
      <div class="line" id="2-lineno16">"--ignore=tests/test_freeimage.py"
        or "-k not &lt;test-name&gt;".</div>
    </blockquote>
    <p>Done, but I had to keep the TMPDIR substitution.</p>
    <p>
      <blockquote type="cite">Maybe install from Git?
        <div class="line" id="2-lineno22"><a
href="https://github.com/imageio/imageio-freeimage/blob/master/tests/test_freeimage.py"
            class="moz-txt-link-freetext">https://github.com/imageio/imageio-freeimage/blob/master/tests/test_freeimage.py</a></div>
        <div class="line" id="2-lineno23">the only one tests file which
          does not require urllib or requrests.</div>
      </blockquote>
    </p>
    <p>I tried, but most tests run imageio's downloader under the hood.
      IIRC only 2 tests pass by default. Then I got to a point where
      some tests pass in the build environment preserved by -K but still
      don't pass in the build run. I eventually gave up on it as a few
      other tests were still failing.<br>
    </p>
    <p>
      <blockquote type="cite">Maybe swap to #$(this-package-input
        "&lt;package&gt;") instead?</blockquote>
      Wasn't search-input-file preferred to not break package
      transformation? I skipped this change in v3.<br>
    </p>
  </body>
</html>

--------------n2PxZLoJP8aNrhFEHDJFknyo--




Information forwarded to guix-patches@HIDDEN:
bug#76354; Package guix-patches. Full text available.

Message received at 76354 <at> debbugs.gnu.org:


Received: (at 76354) by debbugs.gnu.org; 2 Mar 2025 00:23:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 01 19:23:49 2025
Received: from localhost ([127.0.0.1]:47086 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1toX7N-0005m2-2K
	for submit <at> debbugs.gnu.org; Sat, 01 Mar 2025 19:23:49 -0500
Received: from mout02.posteo.de ([185.67.36.66]:47049)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monego@HIDDEN>) id 1toX7J-0005kv-Kf
 for 76354 <at> debbugs.gnu.org; Sat, 01 Mar 2025 19:23:40 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 06B08240101
 for <76354 <at> debbugs.gnu.org>; Sun,  2 Mar 2025 01:23:29 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1740875010; bh=W9HkIkrhlI8iClzR2AMXLaWb2RwpQMbQAyxnb1uFUxg=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 Content-Transfer-Encoding:From;
 b=l0Y08ZmlL/gViOjUU8Hos8eyyiaC04Q5FSOLU3g58sYOa9ZJ1DOK9+YRRsCHiHxcm
 LzwHHY7mQ8M4LNBOzPwWeV3Xu9hGHQzogmsjXvRR41HOhxQD/83UtM3U82MzjOXUNw
 eTuBA2x8Fr+ppnP0u1eYyCQzrUXyW1x/GdSdb4EGg2Y+ieoMqZRIpXI1+q/yEVVJNh
 1GeeYA5Kgw6/OlmBmsoMNxddcztiWJj01P9foXJc2dCLIqKcpMIjwdW39VZV2KGo5y
 BFkIS/qVc2+2FF+6ZUAEUYidE+ycZdX1ibqi1pJ8K07xpit0yneJbCxTp00Po+khWv
 z6dsb1uEGZv8w==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Z52jX430qz9rxB;
 Sun,  2 Mar 2025 01:23:26 +0100 (CET)
From: Vinicius Monego <monego@HIDDEN>
To: 76354 <at> debbugs.gnu.org
Subject: [PATCH v3] gnu: Add python-imageio-freeimage.
Date: Sun,  2 Mar 2025 00:23:17 +0000
Message-ID: <f43c75335e45e89e93db0c93dde8a970988ffac0.1740874843.git.monego@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76354
Cc: Vinicius Monego <monego@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/python-xyz.scm (python-imageio-freeimage): New variable.
(python-imageio)[arguments]<#:phases>: Remove the freeimage substitution
from the 'fix-source phase. Delete the 'fix-failing-tests phase, add
test logic in #:test-flags instead.
[inputs]: Remove freeimage.

Change-Id: I842998baea1568e1d9d1328e4387d14867bd3bb2
---
 gnu/packages/python-xyz.scm | 68 +++++++++++++++++++++++++++----------
 1 file changed, 51 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c15671b53f..d3b42f7631 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -80,7 +80,7 @@
 ;;; Copyright © 2020 Josh Holland <josh@HIDDEN>
 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@HIDDEN>
 ;;; Copyright © 2020, 2022 Michael Rohleder <mike@HIDDEN>
-;;; Copyright © 2020, 2021, 2022, 2023, 2024 Vinicius Monego <monego@HIDDEN>
+;;; Copyright © 2020, 2021, 2022, 2023, 2024, 2025 Vinicius Monego <monego@HIDDEN>
 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@HIDDEN>
 ;;; Copyright © 2020 Hendursaga <hendursaga@HIDDEN>
 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@HIDDEN>
@@ -12014,6 +12014,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")
@@ -12028,28 +12072,18 @@ (define-public python-imageio
     (build-system pyproject-build-system)
     (arguments
      (list
-      #:test-flags #~(list "-m" "not needs_internet")
+      #:test-flags #~(list "-m" "not needs_internet"
+                           ;; This attempts to load libGL.so (provided by mesa)
+                           ;; at the Python store path (sys.base_prefix?).
+                           "-k" "not test_findlib2"
+                           "--ignore" "tests/test_freeimage.py")
       #:phases
       #~(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\")"))))
-          (add-after 'unpack 'fix-failing-tests
-            (lambda _
-              (substitute* "tests/test_core.py"
-                (("(core\\.load_lib)\\((\\[gllib\\], \\[\\])\\)"
-                  all fun args)
-                 (string-append "raises(ValueError, " fun ", " args ")")))
-              (delete-file "tests/test_freeimage.py"))))))
-    (inputs (list freeimage))
+                 "os.getenv(\"TMPDIR\", \"/tmp\")")))))))
     (propagated-inputs
      (list python-imageio-ffmpeg python-numpy python-pillow python-tifffile))
     (native-inputs

base-commit: e7b87dcde25b5ef278441d6ea42a7f662fe6d53f
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#76354; Package guix-patches. Full text available.

Message received at 76354 <at> debbugs.gnu.org:


Received: (at 76354) by debbugs.gnu.org; 18 Feb 2025 17:26:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 18 12:26:02 2025
Received: from localhost ([127.0.0.1]:60477 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tkRM9-0001Ta-UP
	for submit <at> debbugs.gnu.org; Tue, 18 Feb 2025 12:26:02 -0500
Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:54424)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <sharlatanus@HIDDEN>)
 id 1tkRM6-0001SH-Ql
 for 76354 <at> debbugs.gnu.org; Tue, 18 Feb 2025 12:26:00 -0500
Received: by mail-wm1-x32f.google.com with SMTP id
 5b1f17b1804b1-43948f77f1aso37787555e9.0
 for <76354 <at> debbugs.gnu.org>; Tue, 18 Feb 2025 09:25:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1739899552; x=1740504352; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:subject:to:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=WcwY+FUU8b0J/cRqksKRy1kJhJLmnlElq339q+ODUWM=;
 b=LvMi9f8NII99/eTU/xc9yoWs1DO0toNaVpdFoRvUysIbltlfdUKAp1opG1bk7JiykY
 37zXyBbDF1vs1qeEY5+N8MGSrPkKCpIXQagaCVLBSqzhla3sSOXDqSNNp39CdbkThXoD
 p8CKJRP0nX6KBmi2DkI1yxdQKernjmQm3PP44hcmPD057K9Sl4SIq0n754AtLXOhISVq
 n+NIAlfzc9H7JA6jUwjtCpUzmXfNETTgm7Qeq/Pq+icPo4RCI7LkUpBiYpIM1pUV1zbx
 xj42CtdR3yr5yratQyBkr7XDRTU+nJZIsqlQZN7k7hiphXxRgphQVxO6oK5YdfsXwY/I
 RzBg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1739899552; x=1740504352;
 h=mime-version:message-id:date:subject:to:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=WcwY+FUU8b0J/cRqksKRy1kJhJLmnlElq339q+ODUWM=;
 b=h4+nSWf+ekuckt26AkULsc8iMwNyWUUJUx0ZOTI8bF4ryzfmJ3IhP9ZLNTAXtloDIc
 I31mj6D+0ZCdRpmvqGKE65JieWaC9NgBPSfULjZWpwFWuxXlkkwNVoiztHH3Xx2MOC7L
 DVFoh2pzpWSZuDcXa+NFbg0CRnZNpX2W77G8Ld9jpa09a02TA5WgGu0pCgvJw8zcNoA1
 NQT28mUH4GzG5LJrFdFloNw01wmi+QivEb/rCXqtCvhzOoOSr2rEUAdALXKm2usaVynl
 Rdh4nNDJbsgwL356n39z29/96dldqoXQAUJO0GOJGHu54Pnn5BfZXvZhSEKpfghZFX5O
 KuUQ==
X-Gm-Message-State: AOJu0Yxhq01m3rxLB3lPywViPpbKop7SLACr3QOn3jbtm7ULm0qk+s26
 fLuxHat2P0zdPktaV+z2yfHRgFKQhRvCsUfZZLvV8QGrdj92e8ZBAXUY8A==
X-Gm-Gg: ASbGncvMVgWpZYUOVFMptEM7KQk0X+Nwci1feklXBPg+Oiz+MBPo6zq7RYnUIHypIGi
 i2OkzzkpEc6QcCkHgj7byiWXJ25LN2TEG1RF/pebzoP68Mrj0JAx7Q/vFJ3OdowUVWcIh1PH4mk
 1YDNnj2aXpXsQW8RHjJtFZlMc4cneGYyxFmPEEScrcaqMHqQJq6fsK0pCgu0r/GjDbHC0V04AMn
 AdDP4gYmOhgrDKdNiMLVddBd9lvafU8wE62/H7FzJKWX3oBKe3mlkvzQNaD3frldYWZ4p6gWRVC
 gPlVW0VOpdAoy57Ye3t/zywB+Ycb3vemBLDbWf834Z4YAoWrNpoK4asw47rHSwhXNLY=
X-Google-Smtp-Source: AGHT+IFWHn26380vek2CHGDdn0CHbJaHU0PU7VRTnLraxpiCvijcanX/cdcnelxonX3AipwKnWNFXA==
X-Received: by 2002:a05:600c:1c83:b0:439:9828:c44b with SMTP id
 5b1f17b1804b1-4399828c601mr19304475e9.14.1739899551894; 
 Tue, 18 Feb 2025 09:25:51 -0800 (PST)
Received: from guxtil (cpc100684-bagu15-2-0-cust967.1-3.cable.virginm.net.
 [86.8.111.200]) by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-38f258f0597sm15318820f8f.42.2025.02.18.09.25.51
 for <76354 <at> debbugs.gnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 18 Feb 2025 09:25:51 -0800 (PST)
From: Sharlatan Hellseher <sharlatanus@HIDDEN>
To: 76354 <at> debbugs.gnu.org
Subject: [PATCH] gnu: Add python-imageio-freeimage.
Date: Tue, 18 Feb 2025 17:25:49 +0000
Message-ID: <87ldu3b1wi.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 76354
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain


Hi,

> (python-imageio)[arguments]: Remove the freeimage substitution from the
> 'fix-source phase.

--8<---------------cut here---------------start------------->8---
          (add-after 'unpack 'fix-failing-tests
            (lambda _
              (substitute* "tests/test_core.py"
                (("(core\\.load_lib)\\((\\[gllib\\], \\[\\])\\)"
                  all fun args)
                 (string-append "raises(ValueError, " fun ", " args ")")))
              (delete-file "tests/test_freeimage.py"))))))
--8<---------------cut here---------------end--------------->8---
It looks the whole [arguments] block may be removed and skip test
logic applied in #:test-flags as the package uses python-pytest e.g.
"--ignore=tests/test_freeimage.py" or "-k not <test-name>".

--8<---------------cut here---------------start------------->8---
+      #:tests? #f ; tests need internet and are not distributed in PyPI
--8<---------------cut here---------------end--------------->8---
Maybe install from Git?
<https://github.com/imageio/imageio-freeimage/blob/master/tests/test_freeimage.py>
the only one tests file which does not require urllib or requrests.

--8<---------------cut here---------------start------------->8---
 (symlink (search-input-file inputs "lib/libfreeimage.so")
--8<---------------cut here---------------end--------------->8---
Maybe swap to #$(this-package-input "<package>") instead?

---
Oleg

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAme0wp0ACgkQdtcnv/Ys
0rXAQg//YlcLyRHdxJgapb9ayVs/nGyhSFHqMxgfOW0ZhemvmRQlQKNsqqBJCkPG
+mU0HDvGrfURnxVRH9WT5uJy/zS8Im5vudmDQrpK/9bnxOT/Jd7f70S7D3+jaQDv
JxFtZqQm2y9aC3OYzXKuGvl7dfa8xbJH58K+Dc515GN23aGuiNAJrGZhkWioB4Hv
wn9ZWuPGQBYOTNhzWJ2TK4I0V5LjGzoiaShtXKKa+iVrwr93a78lvufCStbIhzdj
QLUAjKLIQfQxiZ3RD5+hmBqWvMvc61PpMR31iSzwuAemFUrQR8nRXFq5HfWSeb5E
tS6QR2ihBfJNbCg1gJKWyCf97oAdm9CAzU7eGVueKRlWfcMNfeFVlcGYWH4FrjgZ
/nMKS7hXNNEaA+fhQM9Q8WARhgTtr9FUaoNb0eTGh5qmF+XRqDCGHN57MYlrUVd4
P5rEWc9oLtuLYjInXU0maW6eAD4RQbbmlxM3x+jnHqAxiuIIUVBumNokTBk9HjYD
RasnYSVhe9BYLnfXSiLaPi0RTisVNPSgF33tDW+dQPw5dC6/0OjV4vF4weTdBXRf
pNdDvdGi9hbbiI7sOZ509zKgSPkb2677VNIuQO5+BJkpo+IaJq2+5gOEGk0cqCR2
Ij8B4EhlevQ0zO9sCJ3QWfoSfDtoh57uOgpw0kNt8fZt8cN8QRo=
=fJ70
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#76354; Package guix-patches. Full text available.

Message received at 76354 <at> debbugs.gnu.org:


Received: (at 76354) by debbugs.gnu.org; 17 Feb 2025 00:01:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 16 19:01:03 2025
Received: from localhost ([127.0.0.1]:39208 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tjoZE-0000ZJ-40
	for submit <at> 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 <monego@HIDDEN>) id 1tjoZ9-0000YR-Dc
 for 76354 <at> 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 <at> 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 <monego@HIDDEN>
To: 76354 <at> debbugs.gnu.org
Subject: [PATCH v2] gnu: Add python-imageio-freeimage.
Date: Mon, 17 Feb 2025 00:00:35 +0000
Message-ID: <22439888825192df60e3ae5b34c302a685d231eb.1739750350.git.monego@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -3.3 (---)
X-Debbugs-Envelope-To: 76354
Cc: Vinicius Monego <monego@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* 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(-)

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 <josh@HIDDEN>
 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@HIDDEN>
 ;;; Copyright © 2020, 2022 Michael Rohleder <mike@HIDDEN>
-;;; Copyright © 2020, 2021, 2022, 2023, 2024 Vinicius Monego <monego@HIDDEN>
+;;; Copyright © 2020, 2021, 2022, 2023, 2024, 2025 Vinicius Monego <monego@HIDDEN>
 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@HIDDEN>
 ;;; Copyright © 2020 Hendursaga <hendursaga@HIDDEN>
 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@HIDDEN>
@@ -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

base-commit: b4dc8eb4adff9d824ff7df704e134964b3b47396
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#76354; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Feb 2025 23:43:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 16 18:43:37 2025
Received: from localhost ([127.0.0.1]:39077 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tjoIO-0007Za-4v
	for submit <at> debbugs.gnu.org; Sun, 16 Feb 2025 18:43:37 -0500
Received: from lists.gnu.org ([2001:470:142::17]:39756)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monego@HIDDEN>) id 1tjoIJ-0007Yu-Pf
 for submit <at> debbugs.gnu.org; Sun, 16 Feb 2025 18:43:30 -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 <monego@HIDDEN>) id 1tjoIE-0007YM-CS
 for guix-patches@HIDDEN; Sun, 16 Feb 2025 18:43:22 -0500
Received: from mout01.posteo.de ([185.67.36.65])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <monego@HIDDEN>) id 1tjoIA-0008Na-Mr
 for guix-patches@HIDDEN; Sun, 16 Feb 2025 18:43:22 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 410FA240027
 for <guix-patches@HIDDEN>; Mon, 17 Feb 2025 00:43:15 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1739749395; bh=mkNzf+vNeDh8GQai3nh7+H4F76jcoWGUaHtfp8huI5w=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 Content-Transfer-Encoding:From;
 b=dWHkBo2NXiPWMRBTianBZWped4aE36+JWPlIRY29ThoCubNYJNfy59FoNj6zrHghm
 StQExiFmNYT3Jdm58cSvABK5c4tHB9TOQ6RDXKJ7+R6ukzfoa96ajkJBvPrgXtIW8p
 nL3LuXz+OBsm2UAJ/tRGMt1C2NpWhkWVW7rePvkiDIuTN0vqDkvsIVLWaxfcXU3YO+
 VYfOotuIXhHcca7+I6K5Cs1QT3wQ5JZWfXVPZT4EdCv8xNEbudHRbpfLTGa1Zi9e2u
 8Zu3b+7YnxLCYju6u0zGYIRiEQh323YU96u3MykrGaSXqWDJRMVHngyZ+JS50fpTyP
 +QoS2ZLosMYYQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Yx2R6025Xz9rxB;
 Mon, 17 Feb 2025 00:43:13 +0100 (CET)
From: Vinicius Monego <monego@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: Add python-imageio-freeimage.
Date: Sun, 16 Feb 2025 23:41:56 +0000
Message-ID: <0a6be0beacf3a8eab021bb32670e02ccf520f038.1739748428.git.monego@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=185.67.36.65; envelope-from=monego@HIDDEN;
 helo=mout01.posteo.de
X-Spam_score_int: -53
X-Spam_score: -5.4
X-Spam_bar: -----
X-Spam_report: (-5.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01,
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
Cc: Vinicius Monego <monego@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

* 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
---
This patch is intended to clear transitive dependencies on openexr@2 and freeimage via imageio, which includes a freeimage plugin. Imageio has around ~100 packages to rebuild.

Freeimage last release was back in 2018, it is unknown to me whether it is still maintained and it may contain known and unpatched vulnerabilities (guix lint -c cve freeimage). OpenEXR 2 was also abandoned in favor of OpenEXR 3.

It seems that Debian has a patch to make freeimage work with OpenEXR 3. I may have a look at this later.

I noticed that imageio made a separate package for freeimage due to license concerns but I thought it would be a good fit for Guix for the reasons aforementioend.

Anyway, freeimage is slowly being deprecated in imageio: https://github.com/imageio/imageio/issues/892

 gnu/packages/python-xyz.scm | 51 +++++++++++++++++++++++++++++++------
 1 file changed, 43 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index bb0ab777d5..0a9d0e02b0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -80,7 +80,7 @@
 ;;; Copyright © 2020 Josh Holland <josh@HIDDEN>
 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@HIDDEN>
 ;;; Copyright © 2020, 2022 Michael Rohleder <mike@HIDDEN>
-;;; Copyright © 2020, 2021, 2022, 2023, 2024 Vinicius Monego <monego@HIDDEN>
+;;; Copyright © 2020, 2021, 2022, 2023, 2024, 2025 Vinicius Monego <monego@HIDDEN>
 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@HIDDEN>
 ;;; Copyright © 2020 Hendursaga <hendursaga@HIDDEN>
 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@HIDDEN>
@@ -11892,6 +11892,48 @@ (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:gplv2 license:gplv3 license:non-copyleft))))
+
 (define-public python-imageio
   (package
     (name "python-imageio")
@@ -11911,12 +11953,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 +11963,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

base-commit: b4dc8eb4adff9d824ff7df704e134964b3b47396
-- 
2.48.1





Acknowledgement sent to Vinicius Monego <monego@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#76354; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 7 Apr 2025 11:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.