[arch-commits] Commit in python-piexif/repos/community-staging-any (3 files)

Evangelos Foutras foutrelis at archlinux.org
Wed Nov 11 14:25:04 UTC 2020


    Date: Wednesday, November 11, 2020 @ 14:25:04
  Author: foutrelis
Revision: 750777

archrelease: copy trunk to community-staging-any

Added:
  python-piexif/repos/community-staging-any/PKGBUILD
    (from rev 750776, python-piexif/trunk/PKGBUILD)
  python-piexif/repos/community-staging-any/pillow-7.2.patch
    (from rev 750776, python-piexif/trunk/pillow-7.2.patch)
Deleted:
  python-piexif/repos/community-staging-any/PKGBUILD

------------------+
 PKGBUILD         |   81 +++++++++++++++++++++++++++++------------------------
 pillow-7.2.patch |   40 ++++++++++++++++++++++++++
 2 files changed, 85 insertions(+), 36 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-11 14:25:00 UTC (rev 750776)
+++ PKGBUILD	2020-11-11 14:25:04 UTC (rev 750777)
@@ -1,36 +0,0 @@
-# Maintainer: David Runge <dave at sleepmap.de>
-_name=piexif
-pkgname=python-piexif
-pkgver=1.1.3
-pkgrel=4
-pkgdesc="To simplify exif manipulations with python. Writing, reading, and more"
-arch=('any')
-url="https://github.com/hMatoba/Piexif"
-license=('MIT')
-depends=('python')
-makedepends=('python-setuptools')
-checkdepends=('python-pytest' 'python-pillow' 'python-sphinx')
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.zip")
-sha512sums=('df5f7793c39911af58bbae76cf998e2a7bc820b84dcf9808ee8f6a38f766f824fef28392ef88387e18b10c270c4b27881be310f0368076b6fb65379a11a93270')
-
-build() {
-  cd "${_name}-${pkgver}"
-  python setup.py build
-}
-
-check() {
-  cd "${_name}-${pkgver}"
-  export PYTHONPATH="build:${PYTHONPATH}"
-  py.test
-}
-
-package() {
-  cd "${_name}-${pkgver}"
-  python setup.py install --skip-build \
-    --optimize=1 \
-    --prefix=/usr \
-    --root="${pkgdir}"
-  install -vDm 644 LICENSE.txt \
-    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-  install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
-}

Copied: python-piexif/repos/community-staging-any/PKGBUILD (from rev 750776, python-piexif/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-11-11 14:25:04 UTC (rev 750777)
@@ -0,0 +1,45 @@
+# Maintainer: David Runge <dave at sleepmap.de>
+_name=Piexif
+pkgname=python-piexif
+pkgver=1.1.3
+pkgrel=5
+pkgdesc="To simplify exif manipulations with python. Writing, reading, and more"
+arch=('any')
+url="https://github.com/hMatoba/Piexif"
+license=('MIT')
+depends=('python')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest' 'python-pillow' 'libwebp' 'python-sphinx')
+source=($pkgname-$pkgver.tar.gz::https://github.com/hMatoba/Piexif/archive/$pkgver.tar.gz
+        pillow-7.2.patch)
+sha512sums=('bae3a51603bf46e9a8170db180a298c70c77537cb405582eb53ade2b29907fbaeeb4d890a124e0a54de53077b7631c007be088c690f81fb3eda1cd3ccb1ca0d2'
+            'be1ee541e3bb6c219d6fd9ab68e9143c2131f695a2001d36a0d63b0566d71a542a09d58dc0bcbdb8c1353297156ea7853d483b9a44407cb31c30acc4252310bf')
+
+prepare() {
+  cd "${_name}-${pkgver}"
+
+  # https://github.com/hMatoba/Piexif/issues/108
+  patch -Np1 -i ../pillow-7.2.patch
+}
+
+build() {
+  cd "${_name}-${pkgver}"
+  python setup.py build
+}
+
+check() {
+  cd "${_name}-${pkgver}"
+  export PYTHONPATH="build:${PYTHONPATH}"
+  py.test
+}
+
+package() {
+  cd "${_name}-${pkgver}"
+  python setup.py install --skip-build \
+    --optimize=1 \
+    --prefix=/usr \
+    --root="${pkgdir}"
+  install -vDm 644 LICENSE.txt \
+    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
+}

Copied: python-piexif/repos/community-staging-any/pillow-7.2.patch (from rev 750776, python-piexif/trunk/pillow-7.2.patch)
===================================================================
--- pillow-7.2.patch	                        (rev 0)
+++ pillow-7.2.patch	2020-11-11 14:25:04 UTC (rev 750777)
@@ -0,0 +1,40 @@
+From 5209b53e9689ce28dcd045f384633378d619718f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Wi=C5=9Bniewski?= <vuko at 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)



More information about the arch-commits mailing list