diff options
| author | Liguros - Gitlab CI/CD [master] <gitlab@liguros.net> | 2020-12-16 00:00:18 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [master] <gitlab@liguros.net> | 2020-12-16 00:00:18 +0000 |
| commit | c16790af2c9b4cbc38e565d4311252193ff85484 (patch) | |
| tree | 4f43ee770507dee235d6b4f9433d9f807781fcc8 /dev-python/piexif | |
| parent | fddf516add4924cfe9d698f116342e30b27d67b8 (diff) | |
| download | baldeagleos-repo-21.1.1.tar.gz baldeagleos-repo-21.1.1.tar.xz baldeagleos-repo-21.1.1.zip | |
Updating liguros repo21.1.1
Diffstat (limited to 'dev-python/piexif')
| -rw-r--r-- | dev-python/piexif/files/piexif-1.1.3-tests-pillow-7.2.0.patch | 40 | ||||
| -rw-r--r-- | dev-python/piexif/piexif-1.1.3-r1.ebuild | 38 | ||||
| -rw-r--r-- | dev-python/piexif/piexif-1.1.3.ebuild | 12 |
3 files changed, 89 insertions, 1 deletions
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/piexif-1.1.3-r1.ebuild b/dev-python/piexif/piexif-1.1.3-r1.ebuild new file mode 100644 index 000000000000..e7dd8c9ba60a --- /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,7,8,9,10} pypy3 ) + +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 2ee96f6045b1..62f016bbbb9c 100644 --- a/dev-python/piexif/piexif-1.1.3.ebuild +++ b/dev-python/piexif/piexif-1.1.3.ebuild @@ -5,7 +5,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{6,7,8,9,10} pypy3 ) -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 } |
