mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
New package: python3-piexif-1.1.3
This commit is contained in:
parent
8a06819eba
commit
9d71852a09
2 changed files with 58 additions and 0 deletions
40
srcpkgs/python3-piexif/patches/pillow-7.2.patch
Normal file
40
srcpkgs/python3-piexif/patches/pillow-7.2.patch
Normal file
|
@ -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)
|
18
srcpkgs/python3-piexif/template
Normal file
18
srcpkgs/python3-piexif/template
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Template file for 'python3-piexif'
|
||||||
|
pkgname=python3-piexif
|
||||||
|
version=1.1.3
|
||||||
|
revision=1
|
||||||
|
build_style=python3-module
|
||||||
|
hostmakedepends="python3-setuptools"
|
||||||
|
depends="python3"
|
||||||
|
checkdepends="python3-pytest python3-Pillow"
|
||||||
|
short_desc="Exif manipulation with pure python script"
|
||||||
|
maintainer="Michal Vasilek <michal@vasilek.cz>"
|
||||||
|
license="MIT"
|
||||||
|
homepage="https://github.com/hMatoba/Piexif"
|
||||||
|
distfiles="https://github.com/hMatoba/Piexif/archive/refs/tags/${version}.tar.gz"
|
||||||
|
checksum=abfd9a67795e23d7a76f9407d60841efa68c5d6e43376b295bb821a30602c569
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
vlicense LICENSE.txt
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue