summaryrefslogtreecommitdiff
path: root/dev-python/piexif
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /dev-python/piexif
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'dev-python/piexif')
-rw-r--r--dev-python/piexif/Manifest1
-rw-r--r--dev-python/piexif/files/piexif-1.1.3-tests-pillow-7.2.0.patch40
-rw-r--r--dev-python/piexif/metadata.xml9
-rw-r--r--dev-python/piexif/piexif-1.1.3-r4.ebuild39
4 files changed, 89 insertions, 0 deletions
diff --git a/dev-python/piexif/Manifest b/dev-python/piexif/Manifest
new file mode 100644
index 000000000000..8f8ab116dfe9
--- /dev/null
+++ b/dev-python/piexif/Manifest
@@ -0,0 +1 @@
+DIST piexif-1.1.3.zip 1011134 BLAKE2B b27d4419cf545f6205b13c5646dff9fc7b1ce6e5de538f6a7189e6cadb54d301e11cbf0feaed8b073cbf16de95d67c621b68657b35fc0ba2025281ee64be4e51 SHA512 df5f7793c39911af58bbae76cf998e2a7bc820b84dcf9808ee8f6a38f766f824fef28392ef88387e18b10c270c4b27881be310f0368076b6fb65379a11a93270
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
new file mode 100644
index 000000000000..5bdb9f08eb6c
--- /dev/null
+++ b/dev-python/piexif/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>sping@gentoo.org</email>
+ </maintainer>
+ <stabilize-allarches />
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>
diff --git a/dev-python/piexif/piexif-1.1.3-r4.ebuild b/dev-python/piexif/piexif-1.1.3-r4.ebuild
new file mode 100644
index 000000000000..79537b054c88
--- /dev/null
+++ b/dev-python/piexif/piexif-1.1.3-r4.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit edos2unix distutils-r1 pypi
+
+DESCRIPTION="Exif manipulation with pure Python"
+HOMEPAGE="
+ https://github.com/hMatoba/Piexif/
+ https://pypi.org/project/piexif/
+"
+SRC_URI="$(pypi_sdist_url "${PN}" "${PV}" .zip)"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 arm64 ~riscv ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ app-arch/unzip
+ test? ( dev-python/pillow[jpeg,${PYTHON_USEDEP}] )
+"
+
+PATCHES=(
+ # From https://github.com/hMatoba/Piexif/pull/109
+ "${FILESDIR}"/${P}-tests-pillow-7.2.0.patch
+)
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ edos2unix tests/s_test.py # to be able to patch it
+ default
+}