From 92fb25ecc1ed7104592a6c310ae569775932aebda77680c8c5f00aed047fb643 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 7 Sep 2020 06:40:44 +0000 Subject: [PATCH] =?UTF-8?q?-=20Update=20to=202.3.1:=20=20=20*=20Fix=20bug?= =?UTF-8?q?=20introduced=20with=20v2.3.0=20in=20HEIC=20processing.=20=20?= =?UTF-8?q?=20*=20Add=20notice=20on=20Python2=20EOL=20=20=20*=20Modernize?= =?UTF-8?q?=20code=20and=20improve=20testing,=20split=20up=20some=20huge?= =?UTF-8?q?=20functions=20=20=20*=20Added=20support=20for=20webp=20file=20?= =?UTF-8?q?format=20(#116)=20by=20Grzegorz=20Ruci=C5=84ski=20=20=20*=20Add?= =?UTF-8?q?=20linting=20=20=20*=20Added=20missing=20IFD=20data=20type;=20c?= =?UTF-8?q?orrect=20spelling=20mistake=20(#119)=20by=20Piero=20=20=20=20?= =?UTF-8?q?=20Toffanin=20=20=20*=20Add=20syntax=20highlight=20for=20README?= =?UTF-8?q?=20(#117)=20by=20John=20Lin=20=20=20*=20Add=20Python=203.8=20to?= =?UTF-8?q?=20CI=20(#113)=20by=202*yo=20=20=20*=20make=20HEIC=20exif=20ext?= =?UTF-8?q?ractor=20much=20more=20compatible=20(#109)=20by=20Tony=20Guo=20?= =?UTF-8?q?=20=20*=20Add=20black=20level=20tag=20(#108)=20=20=20*=20Use=20?= =?UTF-8?q?list=20instead=20of=20tuple=20for=20classifiers=20(#107)=20by?= =?UTF-8?q?=20Florian=20Preinstorfer=20=20=20*=20Add=20support=20for=20Pyt?= =?UTF-8?q?hon=203.5,=203.6,=203.7=20=20=20*=20Drop=20official=20support?= =?UTF-8?q?=20for=20Python=202.6,=203.2,=203.3=20=20=20*=20Fix=20for=20str?= =?UTF-8?q?ing=20count=20equals=200=20(issue=20#67)=20=20=20*=20Rebasing?= =?UTF-8?q?=20of=20struct=20pull=20requests:=20closes=20#54,=20closes=20#6?= =?UTF-8?q?0=20by=20Christopher=20=20=20=20=20Chavez=20=20=20*=20Refactor?= =?UTF-8?q?=20to=20use=20Python's=20struct=20module=20for=20packing/unpack?= =?UTF-8?q?ing=20by=20Dave=20Jones=20=20=20*=20Support=20floating=20point?= =?UTF-8?q?=20fields"=20by=20Reed=20Nightingale=20(reedbn)=20=20=20*=20Raw?= =?UTF-8?q?=20images=20support=20by=20changing=20Tiff=20detection=20by=20x?= =?UTF-8?q?aumex=20=20=20*=20Fix=20GPS=20information=20erroneously=20None?= =?UTF-8?q?=20(#96)=20by=20Christopher=20Chavez=20=20=20*=20Initial=20HEIC?= =?UTF-8?q?=20support=20(Sam=20Rushing)=20-=20Correct=20Source=20URL=20to?= =?UTF-8?q?=20not=20hardcode=20the=20version=20-=20Use=20python=5Fbin=5Fsu?= =?UTF-8?q?ffix=20to=20call=20correct=20script=20during=20check=20-=20Drop?= =?UTF-8?q?=20merged=5Fpr=5F58.patch,=20included=20upstream=20-=20Refresh?= =?UTF-8?q?=20exif-samples-master.tar.gz?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ExifRead?expand=0&rev=7 --- ExifRead-2.1.2.tar.gz | 3 - ExifRead-2.3.1.tar.gz | 3 + exif-samples-master.tar.gz | 4 +- merged_pr_58.patch | 211 ------------------------------------- python-ExifRead.changes | 31 ++++++ python-ExifRead.spec | 11 +- 6 files changed, 40 insertions(+), 223 deletions(-) delete mode 100644 ExifRead-2.1.2.tar.gz create mode 100644 ExifRead-2.3.1.tar.gz delete mode 100644 merged_pr_58.patch diff --git a/ExifRead-2.1.2.tar.gz b/ExifRead-2.1.2.tar.gz deleted file mode 100644 index 76a063a..0000000 --- a/ExifRead-2.1.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:79e244f2eb466709029e8806fe5e2cdd557870c3db5f68954db0ef548d9320ad -size 33159 diff --git a/ExifRead-2.3.1.tar.gz b/ExifRead-2.3.1.tar.gz new file mode 100644 index 0000000..da6a3bc --- /dev/null +++ b/ExifRead-2.3.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:269ff3a8eab8e082734a076182cce6fb126116619c0b7c2009bea34502cca213 +size 37457 diff --git a/exif-samples-master.tar.gz b/exif-samples-master.tar.gz index 29221cb..a0fb674 100644 --- a/exif-samples-master.tar.gz +++ b/exif-samples-master.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2b5e4455adca5f2d8c5a98f1febd093673d0d7cdf320b8cbee9ada71def9f8cf -size 31958779 +oid sha256:803d2ba62269a2a4bd7e082cb5f5d1bbf35cb446c75a9be11c3368dbc87d902c +size 33280634 diff --git a/merged_pr_58.patch b/merged_pr_58.patch deleted file mode 100644 index 08dd04b..0000000 --- a/merged_pr_58.patch +++ /dev/null @@ -1,211 +0,0 @@ -From fba43abc5d0eea1c73ca23f85f6c93cb167cb754 Mon Sep 17 00:00:00 2001 -From: Simone Camporeale -Date: Wed, 7 Oct 2015 12:14:32 +0200 -Subject: [PATCH 1/7] Fix unicode issues - ---- - exifread/classes.py | 19 ++++++++++++------- - 1 file changed, 12 insertions(+), 7 deletions(-) - -diff --git a/exifread/classes.py b/exifread/classes.py -index 91d6b93..9df3cbe 100644 ---- a/exifread/classes.py -+++ b/exifread/classes.py -@@ -224,16 +224,21 @@ def dump_ifd(self, ifd, ifd_name, tag_dict=EXIF_TAGS, relative=0, stop_tag=DEFAU - offset = offset + type_length - - # now 'values' is either a string or an array -+ encoded_values = None - if count == 1 and field_type != 2: -- printable = str(values[0]) -+ encoded_values = values[0] - elif count > 50 and len(values) > 20: -- printable = str(values[0:20])[0:-1] + ", ... ]" -+ encoded_values = [] -+ encoded_values[:0] = values[0:20] -+ encoded_values[:20] = ',...' - else: -- try: -- printable = str(values) -- # fix for python2's handling of unicode values -- except UnicodeEncodeError: -- printable = unicode(values) -+ encoded_values = values -+ -+ try: -+ printable = str(encoded_values) -+ # fix for python2's handling of unicode values -+ except UnicodeEncodeError: -+ printable = unicode(values) - - # compute printable version of values - if tag_entry: - -From 9d3a19ef230589d8af3d3b28763cb78126d4995e Mon Sep 17 00:00:00 2001 -From: Simone Camporeale -Date: Wed, 7 Oct 2015 12:23:11 +0200 -Subject: [PATCH 2/7] Fixed string format. - ---- - exifread/classes.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/exifread/classes.py b/exifread/classes.py -index 9df3cbe..713f7b7 100644 ---- a/exifread/classes.py -+++ b/exifread/classes.py -@@ -230,7 +230,7 @@ def dump_ifd(self, ifd, ifd_name, tag_dict=EXIF_TAGS, relative=0, stop_tag=DEFAU - elif count > 50 and len(values) > 20: - encoded_values = [] - encoded_values[:0] = values[0:20] -- encoded_values[:20] = ',...' -+ encoded_values[:20] = ', ... ]' - else: - encoded_values = values - - -From 065bf2689407d840b49fff0ba41809a36a3096d2 Mon Sep 17 00:00:00 2001 -From: Simone Camporeale -Date: Thu, 8 Oct 2015 08:46:17 +0200 -Subject: [PATCH 3/7] Fixed an error in string appending - ---- - exifread/classes.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/exifread/classes.py b/exifread/classes.py -index 713f7b7..cc98ca7 100644 ---- a/exifread/classes.py -+++ b/exifread/classes.py -@@ -230,7 +230,8 @@ def dump_ifd(self, ifd, ifd_name, tag_dict=EXIF_TAGS, relative=0, stop_tag=DEFAU - elif count > 50 and len(values) > 20: - encoded_values = [] - encoded_values[:0] = values[0:20] -- encoded_values[:20] = ', ... ]' -+ encoded_values[20:] = ', ... ]' -+ encoded_values = ''.join(encoded_values) - else: - encoded_values = values - - -From c9ff961dc99d53ba1b6b53e2214fb255e003519b Mon Sep 17 00:00:00 2001 -From: Simone Camporeale -Date: Mon, 19 Oct 2015 17:54:45 +0200 -Subject: [PATCH 4/7] Fixed issue in data format - ---- - exifread/classes.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/exifread/classes.py b/exifread/classes.py -index cc98ca7..b1d2ddf 100644 ---- a/exifread/classes.py -+++ b/exifread/classes.py -@@ -231,7 +231,7 @@ def dump_ifd(self, ifd, ifd_name, tag_dict=EXIF_TAGS, relative=0, stop_tag=DEFAU - encoded_values = [] - encoded_values[:0] = values[0:20] - encoded_values[20:] = ', ... ]' -- encoded_values = ''.join(encoded_values) -+ encoded_values = ''.join(chr(encoded_values)) - else: - encoded_values = values - - -From 897ee14e94bba19a9f1acbd1cba1c244856be9c6 Mon Sep 17 00:00:00 2001 -From: Simone Camporeale -Date: Mon, 19 Oct 2015 19:35:34 +0200 -Subject: [PATCH 5/7] Added a check to handle string in correct branch - ---- - exifread/classes.py | 21 +++++++-------------- - 1 file changed, 7 insertions(+), 14 deletions(-) - -diff --git a/exifread/classes.py b/exifread/classes.py -index b1d2ddf..ad538d4 100644 ---- a/exifread/classes.py -+++ b/exifread/classes.py -@@ -224,22 +224,15 @@ def dump_ifd(self, ifd, ifd_name, tag_dict=EXIF_TAGS, relative=0, stop_tag=DEFAU - offset = offset + type_length - - # now 'values' is either a string or an array -- encoded_values = None - if count == 1 and field_type != 2: -- encoded_values = values[0] -- elif count > 50 and len(values) > 20: -- encoded_values = [] -- encoded_values[:0] = values[0:20] -- encoded_values[20:] = ', ... ]' -- encoded_values = ''.join(chr(encoded_values)) -+ printable = str(values[0]) -+ elif count > 50 and len(values) > 20 and not isinstance(values, basestring) : -+ printable = str(values[0:20])[0:-1] + ", ... ]" - else: -- encoded_values = values -- -- try: -- printable = str(encoded_values) -- # fix for python2's handling of unicode values -- except UnicodeEncodeError: -- printable = unicode(values) -+ try: -+ printable = str(values) -+ except: -+ printable = unicode(values) - - # compute printable version of values - if tag_entry: - -From 1dda7c2caf4d78f34bf1333ecd5f3daf0e215a0e Mon Sep 17 00:00:00 2001 -From: Simone Camporeale -Date: Mon, 19 Oct 2015 19:41:58 +0200 -Subject: [PATCH 6/7] Indent Error - ---- - exifread/classes.py | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -diff --git a/exifread/classes.py b/exifread/classes.py -index ad538d4..10f405c 100644 ---- a/exifread/classes.py -+++ b/exifread/classes.py -@@ -229,11 +229,10 @@ def dump_ifd(self, ifd, ifd_name, tag_dict=EXIF_TAGS, relative=0, stop_tag=DEFAU - elif count > 50 and len(values) > 20 and not isinstance(values, basestring) : - printable = str(values[0:20])[0:-1] + ", ... ]" - else: -- try: -- printable = str(values) -- except: -- printable = unicode(values) -- -+ try: -+ printable = str(values) -+ except UnicodeEncodeError: -+ printable = unicode(values) - # compute printable version of values - if tag_entry: - # optional 2nd tag element is present - -From 89441161356f48aa35731ef291bd1136fa8cc4e3 Mon Sep 17 00:00:00 2001 -From: Simone Camporeale -Date: Mon, 19 Oct 2015 19:45:29 +0200 -Subject: [PATCH 7/7] Python V3 compatibility - ---- - exifread/classes.py | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/exifread/classes.py b/exifread/classes.py -index 10f405c..7880dc9 100644 ---- a/exifread/classes.py -+++ b/exifread/classes.py -@@ -7,6 +7,10 @@ - - logger = get_logger() - -+try: -+ basestring -+except NameError: -+ basestring = str - - class IfdTag: - """ diff --git a/python-ExifRead.changes b/python-ExifRead.changes index 3253762..5e6adce 100644 --- a/python-ExifRead.changes +++ b/python-ExifRead.changes @@ -1,3 +1,34 @@ +------------------------------------------------------------------- +Mon Sep 7 06:31:09 UTC 2020 - Steve Kowalik + +- Update to 2.3.1: + * Fix bug introduced with v2.3.0 in HEIC processing. + * Add notice on Python2 EOL + * Modernize code and improve testing, split up some huge functions + * Added support for webp file format (#116) by Grzegorz RuciƄski + * Add linting + * Added missing IFD data type; correct spelling mistake (#119) by Piero + Toffanin + * Add syntax highlight for README (#117) by John Lin + * Add Python 3.8 to CI (#113) by 2*yo + * make HEIC exif extractor much more compatible (#109) by Tony Guo + * Add black level tag (#108) + * Use list instead of tuple for classifiers (#107) by Florian Preinstorfer + * Add support for Python 3.5, 3.6, 3.7 + * Drop official support for Python 2.6, 3.2, 3.3 + * Fix for string count equals 0 (issue #67) + * Rebasing of struct pull requests: closes #54, closes #60 by Christopher + Chavez + * Refactor to use Python's struct module for packing/unpacking by Dave Jones + * Support floating point fields" by Reed Nightingale (reedbn) + * Raw images support by changing Tiff detection by xaumex + * Fix GPS information erroneously None (#96) by Christopher Chavez + * Initial HEIC support (Sam Rushing) +- Correct Source URL to not hardcode the version +- Use python_bin_suffix to call correct script during check +- Drop merged_pr_58.patch, included upstream +- Refresh exif-samples-master.tar.gz + ------------------------------------------------------------------- Tue May 26 06:34:09 UTC 2020 - Petr Gajdos diff --git a/python-ExifRead.spec b/python-ExifRead.spec index 0f6fe6b..a8e0efd 100644 --- a/python-ExifRead.spec +++ b/python-ExifRead.spec @@ -18,15 +18,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-ExifRead -Version: 2.1.2 +Version: 2.3.1 Release: 0 Summary: Module to read Exif metadata from TIFF and JPEG files License: BSD-3-Clause -Group: Development/Languages/Python URL: https://pypi.python.org/pypi/ExifRead/%{version} -Source: https://files.pythonhosted.org/packages/source/E/ExifRead/ExifRead-2.1.2.tar.gz +Source: https://files.pythonhosted.org/packages/source/E/ExifRead/ExifRead-%{version}.tar.gz Source1: https://github.com/ianare/exif-samples/archive/master.tar.gz#/exif-samples-master.tar.gz -Patch0: https://patch-diff.githubusercontent.com/raw/ianare/exif-py/pull/58.patch#/merged_pr_58.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -40,7 +38,6 @@ A Python module to extract Exif metadata from TIFF and JPEG files. %prep %setup -q -n ExifRead-%{version} -a1 -%patch0 -p1 %build %python_build @@ -52,8 +49,8 @@ A Python module to extract Exif metadata from TIFF and JPEG files. %check %{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib} -find exif-samples-master -name "*.tiff" -o -name "*.jpg" -exec $python %{buildroot}%{_bindir}/EXIF.py {} \; -find exif-samples-master -name "*.tiff" -o -name "*.jpg" -exec $python %{buildroot}%{_bindir}/EXIF.py -dc {} \; +find exif-samples-master -name "*.tiff" -o -name "*.jpg" -exec $python %{buildroot}%{_bindir}/EXIF.py-%{python_bin_suffix} {} \; +find exif-samples-master -name "*.tiff" -o -name "*.jpg" -exec $python %{buildroot}%{_bindir}/EXIF.py-%{python_bin_suffix} -dc {} \; } %post