From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0K+uCJQg0mEnCQAAgWs5BA (envelope-from ) for ; Sun, 02 Jan 2022 23:00:52 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qEYfBpQg0mESlAAA9RJhRA (envelope-from ) for ; Sun, 02 Jan 2022 23:00:52 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AF03F9B4C for ; Sun, 2 Jan 2022 23:00:51 +0100 (CET) Received: from localhost ([::1]:43064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n48uI-0006d1-OJ for larch@yhetil.org; Sun, 02 Jan 2022 17:00:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n48tW-0006aO-QH for guix-patches@gnu.org; Sun, 02 Jan 2022 17:00:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50509) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n48tW-0003rl-FM for guix-patches@gnu.org; Sun, 02 Jan 2022 17:00:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n48tW-00071q-DL for guix-patches@gnu.org; Sun, 02 Jan 2022 17:00:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52966] [PATCH 1/6] gnu: Add python-piexif. Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 02 Jan 2022 22:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52966 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52966@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164116078826966 (code B ref -1); Sun, 02 Jan 2022 22:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Jan 2022 21:59:48 +0000 Received: from localhost ([127.0.0.1]:33822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n48tH-00070s-V2 for submit@debbugs.gnu.org; Sun, 02 Jan 2022 16:59:48 -0500 Received: from lists.gnu.org ([209.51.188.17]:44174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n48tF-00070i-WB for submit@debbugs.gnu.org; Sun, 02 Jan 2022 16:59:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36582) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n48tF-0006E0-P4 for guix-patches@gnu.org; Sun, 02 Jan 2022 16:59:45 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:47451) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n48tD-0003oP-MI for guix-patches@gnu.org; Sun, 02 Jan 2022 16:59:45 -0500 Received: from hermia.goebel-consult.de ([87.176.157.184]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M89TB-1mzUKG2VF5-005FLw for ; Sun, 02 Jan 2022 22:59:39 +0100 Received: from thisbe.fritz.box (thisbe.fritz.box [192.168.110.24]) by hermia.goebel-consult.de (Postfix) with ESMTP id 8492E5F538; Sun, 2 Jan 2022 22:59:49 +0100 (CET) From: Hartmut Goebel Date: Sun, 2 Jan 2022 22:59:37 +0100 Message-Id: <05cc89ec4c7cb0eda6945690544469f519811ecf.1641160577.git.h.goebel@crazy-compilers.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:1FL5BUT4Ga2AbDyllqyvwZeVBbdHaK4Dn91F2B6o5leJllhf3uQ m9jbvPW5Ptu9WbKvzZvcoC/ElVqZyZwRsA8BNPT9Fvaj4tIuJIDNHh7foMMcQtMndrHbB/g CtiFONZLlinqw2Ghrtp9+dhnJaB+2FS6JVkDGbuU90UERVn+KFJkTITq2QlbGrcsHgeyoeB W+zOvrRxXUhBbiKoFS8uA== X-UI-Out-Filterresults: notjunk:1;V03:K0:7VKcxHgduM0=:ZS7dB/8QxZ4VteGTYDjwsZ dm5DbBj/ncu4hVXHds0MDaOI+3VFbDlxB1QxRHL6xue7lp4/5RRTWidTfgcD7NloXZxpoqoRy Cc/iPEIZxvEi7kTi2I7EpgAnfGDcR5SQvM/gChltf104dphEAuAojfKEHPUohQ5++i+y/DXqD wvAiPPjdi+A6H6HVFHA9D3S6ToWrY8Y4gQrrhgD2cApe4Tpu5jyhO5z7+phY1QU5/cmxxy/UG jSuImQq77NkFZfZjVVS+3Lh/yJlF8QN/UkE0keU6IDaxbqXNpbemXEf5sgg6eMnEs8rIowt4p 8BFqHVg0tIF9CD8QVSw8N2O1YkRsZrXuy32nGaZHJ2n1OXfpywJY6AgliJOMmtKKnl8PdZ8qX us3E+bv8QPM8719FVelEHdH9iGmSSF/PyZFlJUH0BOx1QaUs+TSYBnFhYwp3zFdIEn5WT9/y2 ZGSjNjJYa4rbngc5mGJQhWBAxtX3vBwGQV0tu0MirhiZpu7rim8q/N5c2FQFWXqiBivGzOXNy Bi967CGhrHyWUtEE+Sln8Q5Q+S90CWXRFuuyfu1rh+IMEMhT9uUwh9J9WHwXZ7N/49DNqq6ms HDh4vJRdspwN5a7dA1szwelEERIszB96v0vHnNnxvk4ohUD+62NE3bO7PyzkkRTUZaRXZMOwg SlWeHPYxDTMDPx/DNe3bf0PNnlNCUPBknKSxQcShn+PfXoZI+MmZQXArq7tMb5+TCiNiPNphj TsY8lJ1SVRU2RNQO Received-SPF: none client-ip=212.227.17.24; envelope-from=h.goebel@crazy-compilers.com; helo=mout.kundenserver.de X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641160851; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=35f6P1ITnWnZW/rsyRconEdu28mHtM41h4fhGcuurvM=; b=eQTdCGDAiwoWwp6yrn8QS3TE7omHQPOknkaPZmbmVmwgf43ZzPHHt20lRtEp171ngF3uH5 Sx3NgQJEBzyr0k2tO03/9tSyTDw8F0ilAbuKk95Yu9YB9s3wqt7mcuxR1IdPHJFILCxqRV iRNSeel5RUY8N/LXWKzY4WaYoHMSBuVmOHsnns2j/YMdQL9shw4dGJ9/zf8CjrofYhjZD/ gXQpAFvSWU5Sbhewc4lsR9Wk8ylEZFM8UkBuRTX7xAl/UzGU5JEDGPO4rjeX+w2HBsfkqE 4GR7CpObUHjKbMTvE0n4rdzQSZ5Z73oRoEvFstY4/55ckqrCzMpQo1JSbIa/vw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641160851; a=rsa-sha256; cv=none; b=d8lHSuO1Kj/M/pFuYjcE1YvfFaqyC+p6hktp3N5CWz1/Ko2aW5ziCbXB5C71U+cxbTeRAE uiwjs3DuVgvvTA6wNm5vlYVrhUI3vEfhT822JYoiCkwBWjGpTzx37epH4Tn6LtPhkTMc4+ +MTzLIHSJnv/5qYlJDJ7hVgIAKgFAyBBSeRcELtX2qlnKwifdbwM2CNk41DOIpCTnoMCgh Dafo2E64CoLDBrXF/aAWNMS0bzHtyjx4BySoMPHkOpteiQVvqltGEmu1L5Ww1bYpyjcU4T fKRAx+jhn2AT1nfaOrEE/Fai844bXXc8FW6GrZT0whmTNBMVBuBCKod7yOWmBA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.78 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: AF03F9B4C X-Spam-Score: -3.78 X-Migadu-Scanner: scn0.migadu.com X-TUID: jqc+hXSstqfU * gnu/packages/python-xyz.scm (python-piexif): New variable. * gnu/packages/patches/python-piexif-fix-tests-with-pillow-7.2.patch: New f= ile. * gnu/packages/python-xyz.scm (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + ...hon-piexif-fix-tests-with-pillow-7.2.patch | 44 +++++++++++++++++++ gnu/packages/python-xyz.scm | 22 ++++++++++ 3 files changed, 67 insertions(+) create mode 100644 gnu/packages/patches/python-piexif-fix-tests-with-pillo= w-7.2.patch diff --git a/gnu/local.mk b/gnu/local.mk index 852f9f3246..322b07ad74 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1678,6 +1678,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/python-keras-integration-test.patch \ %D%/packages/patches/python-peachpy-determinism.patch \ %D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \ + %D%/packages/patches/python-piexif-fix-tests-with-pillow-7.2.patch \ %D%/packages/patches/python-pyfakefs-remove-bad-test.patch \ %D%/packages/patches/python-pyflakes-test-location.patch \ %D%/packages/patches/python-flint-includes.patch \ diff --git a/gnu/packages/patches/python-piexif-fix-tests-with-pillow-7.2.p= atch b/gnu/packages/patches/python-piexif-fix-tests-with-pillow-7.2.patch new file mode 100644 index 0000000000..a012a92f91 --- /dev/null +++ b/gnu/packages/patches/python-piexif-fix-tests-with-pillow-7.2.patch @@ -0,0 +1,44 @@ +From 5209b53e9689ce28dcd045f384633378d619718f Mon Sep 17 00:00:00 2001=0D +From: =3D?UTF-8?q?Jan=3D20Wi=3DC5=3D9Bniewski?=3D =0D +Date: Thu, 5 Nov 2020 16:18:52 +0100=0D +Subject: [PATCH] convert IFDRational to tuples in tests=0D +=0D +This fixes tests with Pillow version >=3D 7.2.0=0D +---=0D + tests/s_test.py | 12 ++++++++++++=0D + 1 file changed, 12 insertions(+)=0D +=0D +diff --git a/tests/s_test.py b/tests/s_test.py=0D +index 5d105de..a7cad54 100644=0D +--- a/tests/s_test.py=0D ++++ b/tests/s_test.py=0D +***************=0D +*** 9,14 ****=0D +--- 9,15 ----=0D + import time=0D=0D + import unittest=0D=0D + =0D=0D ++ import PIL=0D=0D + from PIL import Image=0D=0D + import piexif=0D=0D + from piexif import _common, ImageIFD, ExifIFD, GPSIFD, TAGS, InvalidImag= eDataError=0D=0D +***************=0D +*** 580,585 ****=0D +--- 581,597 ----=0D + # test utility methods----------------------------------------------=0D= =0D + =0D=0D + def _compare_value(self, v1, v2):=0D=0D ++ if isinstance(v2, PIL.TiffImagePlugin.IFDRational):=0D=0D ++ v2 =3D (v2.numerator, v2.denominator)=0D=0D ++ if isinstance(v2, tuple):=0D=0D ++ converted_v2 =3D []=0D=0D ++ for el in v2:=0D=0D ++ if isinstance(el, PIL.TiffImagePlugin.IFDRational):=0D=0D ++ converted_v2.append((el.numerator, el.denominator))= =0D=0D ++ else:=0D=0D ++ converted_v2.append(el)=0D=0D ++ v2 =3D tuple(converted_v2)=0D=0D ++ =0D=0D + if type(v1) !=3D type(v2):=0D=0D + if isinstance(v1, tuple):=0D=0D + self.assertEqual(pack_byte(*v1), v2)=0D=0D diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index b6534c677f..4e408f1d49 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -27867,3 +27867,25 @@ keyboard-friendly package.") (description "This package provides a Python interface to iw wireless tools.") (license license:gpl2))) + +(define-public python-piexif + (package + (name "python-piexif") + (version "1.1.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "piexif" version ".zip")) + (sha256 + (base32 "06sz58q4mrw472p8fbnq7wsj8zpi5js5r8phm2hiwfmz0v33bjw3")) + (patches + (search-patches "python-piexif-fix-tests-with-pillow-7.2.patch"))= )) + (build-system python-build-system) + (native-inputs + (list unzip python-pillow)) + (home-page "https://github.com/hMatoba/Piexif") + (synopsis "Simplify exif manipulations with Python") + (description "@code{Piexif} simplifies interacting with EXIF data in +Python. It includes the tools necessary for extracting, creating, +manipulating, converting and writing EXIF data to JPEG, WebP and TIFF file= s.") + (license license:expat))) --=20 2.30.2