forked from pool/python-ExifRead
Accepting request 832672 from devel:languages:python
- 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 OBS-URL: https://build.opensuse.org/request/show/832672 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-ExifRead?expand=0&rev=3
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:79e244f2eb466709029e8806fe5e2cdd557870c3db5f68954db0ef548d9320ad
|
|
||||||
size 33159
|
|
3
ExifRead-2.3.1.tar.gz
Normal file
3
ExifRead-2.3.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:269ff3a8eab8e082734a076182cce6fb126116619c0b7c2009bea34502cca213
|
||||||
|
size 37457
|
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:2b5e4455adca5f2d8c5a98f1febd093673d0d7cdf320b8cbee9ada71def9f8cf
|
oid sha256:803d2ba62269a2a4bd7e082cb5f5d1bbf35cb446c75a9be11c3368dbc87d902c
|
||||||
size 31958779
|
size 33280634
|
||||||
|
@@ -1,211 +0,0 @@
|
|||||||
From fba43abc5d0eea1c73ca23f85f6c93cb167cb754 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Simone Camporeale <simone.camporeale@netgrid.it>
|
|
||||||
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 <simone.camporeale@netgrid.it>
|
|
||||||
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 <simone.camporeale@netgrid.it>
|
|
||||||
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 <simone.camporeale@netgrid.it>
|
|
||||||
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 <simone.camporeale@netgrid.it>
|
|
||||||
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 <simone.camporeale@netgrid.it>
|
|
||||||
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 <simone.camporeale@netgrid.it>
|
|
||||||
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:
|
|
||||||
"""
|
|
@@ -1,3 +1,34 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 7 06:31:09 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- 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 <pgajdos@suse.com>
|
Tue May 26 06:34:09 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
|
||||||
|
|
||||||
|
@@ -18,15 +18,13 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-ExifRead
|
Name: python-ExifRead
|
||||||
Version: 2.1.2
|
Version: 2.3.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Module to read Exif metadata from TIFF and JPEG files
|
Summary: Module to read Exif metadata from TIFF and JPEG files
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Python
|
|
||||||
URL: https://pypi.python.org/pypi/ExifRead/%{version}
|
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
|
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: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@@ -40,7 +38,6 @@ A Python module to extract Exif metadata from TIFF and JPEG files.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n ExifRead-%{version} -a1
|
%setup -q -n ExifRead-%{version} -a1
|
||||||
%patch0 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
@@ -52,8 +49,8 @@ A Python module to extract Exif metadata from TIFF and JPEG files.
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
%{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-%{python_bin_suffix} {} \;
|
||||||
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} -dc {} \;
|
||||||
}
|
}
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
Reference in New Issue
Block a user