summaryrefslogtreecommitdiff
path: root/dev-python/piexif
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-12-14 13:26:14 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-12-14 13:26:14 +0000
commit6abbf81ef2f298e3221ff5e67a1f3c5f23958212 (patch)
tree25413d1cb3a0cbfe36029db32398c0f333609215 /dev-python/piexif
parent9c417bacd51da6d8b57fa9f37425161d30d4b95b (diff)
gentoo resync : 14.12.2020
Diffstat (limited to 'dev-python/piexif')
-rw-r--r--dev-python/piexif/Manifest6
-rw-r--r--dev-python/piexif/files/piexif-1.1.3-tests-pillow-7.2.0.patch40
-rw-r--r--dev-python/piexif/metadata.xml4
-rw-r--r--dev-python/piexif/piexif-1.1.3-r1.ebuild38
-rw-r--r--dev-python/piexif/piexif-1.1.3.ebuild14
5 files changed, 98 insertions, 4 deletions
diff --git a/dev-python/piexif/Manifest b/dev-python/piexif/Manifest
index 7acd80cec411..ec9ed96a3f1a 100644
--- a/dev-python/piexif/Manifest
+++ b/dev-python/piexif/Manifest
@@ -1,3 +1,5 @@
+AUX piexif-1.1.3-tests-pillow-7.2.0.patch 1382 BLAKE2B c7ea03ffe0708b975d64602910bf9c228f0093d9cb717a1b1b9f3e7b6358b94f3bcbd6da8f9bac12fe2ee0745d17defccd196bdd8ec018fea50b7d131e148616 SHA512 be1ee541e3bb6c219d6fd9ab68e9143c2131f695a2001d36a0d63b0566d71a542a09d58dc0bcbdb8c1353297156ea7853d483b9a44407cb31c30acc4252310bf
DIST piexif-1.1.3.zip 1011134 BLAKE2B b27d4419cf545f6205b13c5646dff9fc7b1ce6e5de538f6a7189e6cadb54d301e11cbf0feaed8b073cbf16de95d67c621b68657b35fc0ba2025281ee64be4e51 SHA512 df5f7793c39911af58bbae76cf998e2a7bc820b84dcf9808ee8f6a38f766f824fef28392ef88387e18b10c270c4b27881be310f0368076b6fb65379a11a93270
-EBUILD piexif-1.1.3.ebuild 603 BLAKE2B 8fc5282011f24ea27096c492b2f2be47f87065c9ebc0e79ded616903eec90af0b1aafe2f0abe39a8bc416863183569c84f442fc901902694f44a0b9b863d68fe SHA512 64e98f3d62a54fafed1b2b04e91cc2518b08c08a2439bafa55cea8fca3487fdb94bea972009eeb8acdcbfd0db1f12b70db73e264e08b7c558d69ad24809589d5
-MISC metadata.xml 216 BLAKE2B a7f17874d9514cafd0bbab739d143a00ac66ad8446bce8e05932d122c1631d29ad8077c2bcda021bc92b7e89b77c03d55e8997cf250f3bb55f8a1aca046bb2a7 SHA512 1de1c9f4b223876125a0321126f2d7b1b564a113d24ae86b380c4d67bdf58ed4f2ae1a1f5d686211ccf4851eea8e970c20109977abbc79d0cd855164b6474e23
+EBUILD piexif-1.1.3-r1.ebuild 814 BLAKE2B 724376a8c788cbbfc04e92557666e930721984366e5b85c0352c7669793c61351a2ba06f8e3b45802634e0dfe291d44c509841231efe54284b9aabe050fe8f39 SHA512 8297e04ac2126640d092ff8b868c0755068d3603a15636ca0751d257e057958ddf86820bc3e5a4270154d25d9c4f23d5ce92d0be55dddb9f9f3996654094c18f
+EBUILD piexif-1.1.3.ebuild 802 BLAKE2B 7c266d8a11a7710452d554f7e07d64ff51405c669cf767d736f54a081972deddff5dddf71362112d248cb096a4b6971e6e1eb2bdbcb196c9e4ea92e570331ca4 SHA512 08eba3892bffe7471e2c48739d5c94035c7649dad4d0f748b74f4113eba05d0064300f5d528cdab657d0127053126f3bc612e303fc0b1f151c80a637cd86f222
+MISC metadata.xml 339 BLAKE2B 32abc28c3481c47f9c73594d1ede39100d8dea0ea8c41de777243b78dbda60f4b0ce741465ccd626c89b3924410505fc8edbf3fe8c416800a38b82b16031f72c SHA512 ad095b64f7512a0884d07bae7c47977ef55991a06bec4b4d43c73808a4c902bfd7eca0d2364ddf806301b1b3eb5f5a24d1080abb27157983394fcbc47f6c66b5
diff --git a/dev-python/piexif/files/piexif-1.1.3-tests-pillow-7.2.0.patch b/dev-python/piexif/files/piexif-1.1.3-tests-pillow-7.2.0.patch
new file mode 100644
index 000000000000..b13425a0fc21
--- /dev/null
+++ b/dev-python/piexif/files/piexif-1.1.3-tests-pillow-7.2.0.patch
@@ -0,0 +1,40 @@
+From 5209b53e9689ce28dcd045f384633378d619718f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Wi=C5=9Bniewski?= <vuko@vuko.pl>
+Date: Thu, 5 Nov 2020 16:18:52 +0100
+Subject: [PATCH] convert IFDRational to tuples in tests
+
+This fixes tests with Pillow version >= 7.2.0
+---
+ tests/s_test.py | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/tests/s_test.py b/tests/s_test.py
+index 5d105de..a7cad54 100644
+--- a/tests/s_test.py
++++ b/tests/s_test.py
+@@ -9,6 +9,7 @@
+ import time
+ import unittest
+
++import PIL
+ from PIL import Image
+ import piexif
+ from piexif import _common, ImageIFD, ExifIFD, GPSIFD, TAGS, InvalidImageDataError
+@@ -580,6 +581,17 @@ def test_print_exif(self):
+ # test utility methods----------------------------------------------
+
+ def _compare_value(self, v1, v2):
++ if isinstance(v2, PIL.TiffImagePlugin.IFDRational):
++ v2 = (v2.numerator, v2.denominator)
++ if isinstance(v2, tuple):
++ converted_v2 = []
++ for el in v2:
++ if isinstance(el, PIL.TiffImagePlugin.IFDRational):
++ converted_v2.append((el.numerator, el.denominator))
++ else:
++ converted_v2.append(el)
++ v2 = tuple(converted_v2)
++
+ if type(v1) != type(v2):
+ if isinstance(v1, tuple):
+ self.assertEqual(pack_byte(*v1), v2)
diff --git a/dev-python/piexif/metadata.xml b/dev-python/piexif/metadata.xml
index 82b7b7953794..ca0382cd67ba 100644
--- a/dev-python/piexif/metadata.xml
+++ b/dev-python/piexif/metadata.xml
@@ -4,4 +4,8 @@
<maintainer type="person">
<email>sping@gentoo.org</email>
</maintainer>
+ <upstream>
+ <remote-id type="pypi">piexif</remote-id>
+ <remote-id type="github">hMatoba/Piexif</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/dev-python/piexif/piexif-1.1.3-r1.ebuild b/dev-python/piexif/piexif-1.1.3-r1.ebuild
new file mode 100644
index 000000000000..8cc00f501540
--- /dev/null
+++ b/dev-python/piexif/piexif-1.1.3-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+
+inherit edos2unix distutils-r1
+
+DESCRIPTION="Exif manipulation with pure Python"
+HOMEPAGE="https://github.com/hMatoba/Piexif
+ https://pypi.org/project/piexif/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+ app-arch/unzip
+ test? ( dev-python/pillow[jpeg,${PYTHON_USEDEP}] )"
+RDEPEND=""
+
+PATCHES=(
+ # From https://github.com/hMatoba/Piexif/pull/109
+ "${FILESDIR}"/${P}-tests-pillow-7.2.0.patch
+)
+
+src_prepare() {
+ edos2unix tests/s_test.py # to be able to patch it
+ default
+}
+
+python_test() {
+ "${PYTHON}" setup.py test || die
+}
diff --git a/dev-python/piexif/piexif-1.1.3.ebuild b/dev-python/piexif/piexif-1.1.3.ebuild
index bb976412ab52..d73f2b184359 100644
--- a/dev-python/piexif/piexif-1.1.3.ebuild
+++ b/dev-python/piexif/piexif-1.1.3.ebuild
@@ -3,9 +3,9 @@
EAPI=7
-PYTHON_COMPAT=( pypy3 python3_{6,7,8} )
+PYTHON_COMPAT=( pypy3 python3_{6..9} )
-inherit distutils-r1
+inherit edos2unix distutils-r1
DESCRIPTION="Exif manipulation with pure Python"
HOMEPAGE="https://github.com/hMatoba/Piexif
@@ -23,6 +23,16 @@ DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
test? ( dev-python/pillow[jpeg] )"
RDEPEND=""
+PATCHES=(
+ # From https://github.com/hMatoba/Piexif/pull/109
+ "${FILESDIR}"/${P}-tests-pillow-7.2.0.patch
+)
+
+src_prepare() {
+ edos2unix tests/s_test.py # to be able to patch it
+ default
+}
+
python_test() {
"${PYTHON}" setup.py test || die
}