Hello community, here is the log from the commit of package python-exiv2 for openSUSE:Factory checked in at 2019-04-23 14:35:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-exiv2 (Old) and /work/SRC/openSUSE:Factory/.python-exiv2.new.5536 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-exiv2" Tue Apr 23 14:35:22 2019 rev:4 rq:692487 version:0.6.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-exiv2/python-exiv2.changes 2019-02-04 14:25:06.965062176 +0100 +++ /work/SRC/openSUSE:Factory/.python-exiv2.new.5536/python-exiv2.changes 2019-04-23 14:35:23.725444879 +0200 @@ -1,0 +2,6 @@ +Mon Apr 8 19:10:25 UTC 2019 - Andreas Schneider <a...@cryptomilk.org> + +- Update to version 0.6.1 + * Add the streaming of the preview data + +------------------------------------------------------------------- Old: ---- py3exiv2-0.5.0.tar.gz New: ---- py3exiv2-0.6.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-exiv2.spec ++++++ --- /var/tmp/diff_new_pack.PnvP88/_old 2019-04-23 14:35:24.325445303 +0200 +++ /var/tmp/diff_new_pack.PnvP88/_new 2019-04-23 14:35:24.329445306 +0200 @@ -20,7 +20,7 @@ # This is a python3 only package %define skip_python2 1 Name: python-exiv2 -Version: 0.5.0 +Version: 0.6.1 Release: 0 Summary: Python3 bindings for the exiv2 library License: GPL-3.0-only ++++++ py3exiv2-0.5.0.tar.gz -> py3exiv2-0.6.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.5.0/DESCRIPTION.rst new/py3exiv2-0.6.1/DESCRIPTION.rst --- old/py3exiv2-0.5.0/DESCRIPTION.rst 2015-02-04 14:56:25.000000000 +0100 +++ new/py3exiv2-0.6.1/DESCRIPTION.rst 2019-02-06 15:38:28.000000000 +0100 @@ -9,6 +9,8 @@ python3-exiv2 is distributed under the GPL version 3 license. +[](https://pepy.tech/project/py3exiv2) + The main content of the code was initially written by Olivier Tilloy for Python 2 under the name pyexiv2. py3exiv2 depends on the following libraries: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.5.0/PKG-INFO new/py3exiv2-0.6.1/PKG-INFO --- old/py3exiv2-0.5.0/PKG-INFO 2019-01-30 12:16:29.000000000 +0100 +++ new/py3exiv2-0.6.1/PKG-INFO 2019-02-06 20:33:41.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: py3exiv2 -Version: 0.5.0 +Version: 0.6.1 Summary: A Python3 binding to the library exiv2 Home-page: https://launchpad.net/py3exiv2 Author: Vincent Vande Vyvre @@ -17,6 +17,8 @@ python3-exiv2 is distributed under the GPL version 3 license. + [](https://pepy.tech/project/py3exiv2) + The main content of the code was initially written by Olivier Tilloy for Python 2 under the name pyexiv2. py3exiv2 depends on the following libraries: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.5.0/setup.py new/py3exiv2-0.6.1/setup.py --- old/py3exiv2-0.5.0/setup.py 2019-01-30 11:49:14.000000000 +0100 +++ new/py3exiv2-0.6.1/setup.py 2019-02-06 20:31:14.000000000 +0100 @@ -43,7 +43,7 @@ setup( name='py3exiv2', - version='0.5.0', + version='0.6.1', description='A Python3 binding to the library exiv2', long_description=long_description, url='https://launchpad.net/py3exiv2', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.5.0/src/exiv2wrapper.cpp new/py3exiv2-0.6.1/src/exiv2wrapper.cpp --- old/py3exiv2-0.5.0/src/exiv2wrapper.cpp 2019-01-29 12:31:06.000000000 +0100 +++ new/py3exiv2-0.6.1/src/exiv2wrapper.cpp 2019-02-05 09:28:36.000000000 +0100 @@ -82,18 +82,11 @@ } } -#ifdef HAVE_EXIV2_ERROR_CODE catch (Exiv2::Error& err) { + //std::cout << " Caught Exiv2 exception '" << err.code() << "'\n"; error = err; } -#else - catch (Exiv2::Error& err) - { - std::cout << "Caught Exiv2 exception '" << err << "'\n"; - error = err; - } -#endif // Re-acquire the GIL Py_END_ALLOW_THREADS @@ -171,17 +164,12 @@ _xmpData = &_image->xmpData(); _dataRead = true; } -#ifdef HAVE_EXIV2_ERROR_CODE + catch (Exiv2::Error& err) { + //std::cout << " Caught Exiv2 exception '" << err.code() << "'\n"; error = err; } -#else - catch (Exiv2::Error& err) - { - error = err; - } -#endif // Re-acquire the GIL Py_END_ALLOW_THREADS @@ -212,17 +200,12 @@ { _image->writeMetadata(); } -#ifdef HAVE_EXIV2_ERROR_CODE + catch (Exiv2::Error& err) { + //std::cout << "Caught Exiv2 exception '" << err.code() << "'\n"; error = err; } -#else - catch (Exiv2::Error& err) - { - error = err; - } -#endif // Re-acquire the GIL Py_END_ALLOW_THREADS @@ -515,7 +498,7 @@ // Copy the data buffer in a string. Since the data buffer can contain null // characters ('\x00'), the string cannot be simply constructed like that: - // _data = std::string((char*) previewImage.pData()); + // buffer = std::string((char*) previewImage.pData()); // because it would be truncated after the first occurence of a null // character. Therefore, it has to be copied character by character. // First allocate the memory for the whole string... @@ -589,7 +572,6 @@ return data; } - void Image::eraseExifThumbnail() { _getExifThumbnail()->erase(); @@ -1191,6 +1173,7 @@ _size = previewImage.size(); _dimensions = boost::python::make_tuple(previewImage.width(), previewImage.height()); + // Copy the data buffer in a string. Since the data buffer can contain null // characters ('\x00'), the string cannot be simply constructed like that: // _data = std::string((char*) previewImage.pData()); @@ -1206,6 +1189,13 @@ } } +boost::python::object Preview::getData() const +{ + return boost::python::object(boost::python::handle<>( + PyBytes_FromStringAndSize(_data.c_str(), _size) + )); +} + void Preview::writeToFile(const std::string& path) const { std::string filename = path + _extension; @@ -1219,10 +1209,7 @@ { // Use the Python 'C' API to set up an exception object const char* message = error.what(); - int code = error.code(); - printf("%s: %d\n", message, code); - //int code = error.code(); - //message += (char *) code; + // The type of the Python exception depends on the error code // Warning: this piece of code should be updated in case the error codes // defined by Exiv2 (file 'src/error.cpp') are changed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.5.0/src/exiv2wrapper.hpp new/py3exiv2-0.6.1/src/exiv2wrapper.hpp --- old/py3exiv2-0.5.0/src/exiv2wrapper.hpp 2019-01-29 12:21:47.000000000 +0100 +++ new/py3exiv2-0.6.1/src/exiv2wrapper.hpp 2019-02-06 20:30:31.000000000 +0100 @@ -154,6 +154,7 @@ public: Preview(const Exiv2::PreviewImage& previewImage); + boost::python::object getData() const; void writeToFile(const std::string& path) const; std::string _mimeType; @@ -161,6 +162,7 @@ unsigned int _size; boost::python::tuple _dimensions; std::string _data; + const Exiv2::byte* pData; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.5.0/src/exiv2wrapper_python.cpp new/py3exiv2-0.6.1/src/exiv2wrapper_python.cpp --- old/py3exiv2-0.5.0/src/exiv2wrapper_python.cpp 2019-01-29 12:23:14.000000000 +0100 +++ new/py3exiv2-0.6.1/src/exiv2wrapper_python.cpp 2019-02-05 09:41:52.000000000 +0100 @@ -109,6 +109,7 @@ .def_readonly("dimensions", &Preview::_dimensions) .def_readonly("data", &Preview::_data) + .def("get_data", &Preview::getData) .def("write_to_file", &Preview::writeToFile) ; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.5.0/src/py3exiv2.egg-info/PKG-INFO new/py3exiv2-0.6.1/src/py3exiv2.egg-info/PKG-INFO --- old/py3exiv2-0.5.0/src/py3exiv2.egg-info/PKG-INFO 2019-01-30 12:16:29.000000000 +0100 +++ new/py3exiv2-0.6.1/src/py3exiv2.egg-info/PKG-INFO 2019-02-06 20:33:41.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: py3exiv2 -Version: 0.5.0 +Version: 0.6.1 Summary: A Python3 binding to the library exiv2 Home-page: https://launchpad.net/py3exiv2 Author: Vincent Vande Vyvre @@ -17,6 +17,8 @@ python3-exiv2 is distributed under the GPL version 3 license. + [](https://pepy.tech/project/py3exiv2) + The main content of the code was initially written by Olivier Tilloy for Python 2 under the name pyexiv2. py3exiv2 depends on the following libraries: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.5.0/src/pyexiv2/__init__.py new/py3exiv2-0.6.1/src/pyexiv2/__init__.py --- old/py3exiv2-0.5.0/src/pyexiv2/__init__.py 2019-01-30 08:40:24.000000000 +0100 +++ new/py3exiv2-0.6.1/src/pyexiv2/__init__.py 2018-07-09 11:16:56.000000000 +0200 @@ -3,7 +3,7 @@ # ****************************************************************************** # # Copyright (C) 2006-2011 Olivier Tilloy <oliv...@tilloy.net> -# Copyright (C) 2015-2019 Vincent Vande Vyvre <vincent.vandevy...@oqapy.eu> +# Copyright (C) 2015-2018 Vincent Vande Vyvre <vincent.vandevy...@oqapy.eu> # # This file is part of the py3exiv2 distribution. # @@ -75,7 +75,7 @@ #: A tuple containing the three components of the version number: major, minor, micro. -version_info = (0, 5, 0) +version_info = (0, 4, 0) #: The version of the module as a string (major.minor.micro). __version__ = _make_version(version_info) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.5.0/src/pyexiv2/exif.py new/py3exiv2-0.6.1/src/pyexiv2/exif.py --- old/py3exiv2-0.5.0/src/pyexiv2/exif.py 2019-01-30 08:40:36.000000000 +0100 +++ new/py3exiv2-0.6.1/src/pyexiv2/exif.py 2018-02-02 14:19:27.000000000 +0100 @@ -3,7 +3,7 @@ # ****************************************************************************** # # Copyright (C) 2006-2011 Olivier Tilloy <oliv...@tilloy.net> -# Copyright (C) 2015-2019 Vincent Vande Vyvre <vincent.vandevy...@oqapy.eu> +# Copyright (C) 2015-2018 Vincent Vande Vyvre <vincent.vandevy...@oqapy.eu> # # This file is part of the py3exiv2 distribution. # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.5.0/src/pyexiv2/iptc.py new/py3exiv2-0.6.1/src/pyexiv2/iptc.py --- old/py3exiv2-0.5.0/src/pyexiv2/iptc.py 2019-01-30 08:40:55.000000000 +0100 +++ new/py3exiv2-0.6.1/src/pyexiv2/iptc.py 2018-02-02 14:29:01.000000000 +0100 @@ -3,7 +3,7 @@ # ****************************************************************************** # # Copyright (C) 2006-2011 Olivier Tilloy <oliv...@tilloy.net> -# Copyright (C) 2015-2019 Vincent Vande Vyvre <vincent.vandevy...@oqapy.eu> +# Copyright (C) 2015-2018 Vincent Vande Vyvre <vincent.vandevy...@oqapy.eu> # # This file is part of the py3exiv2 distribution. # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.5.0/src/pyexiv2/preview.py new/py3exiv2-0.6.1/src/pyexiv2/preview.py --- old/py3exiv2-0.5.0/src/pyexiv2/preview.py 2019-01-30 08:41:48.000000000 +0100 +++ new/py3exiv2-0.6.1/src/pyexiv2/preview.py 2019-02-05 09:44:16.000000000 +0100 @@ -68,14 +68,12 @@ """ return self.__preview.dimensions - #@property - #def data(self): - #"""The preview image data buffer. + @property + def data(self): + """The preview image data buffer. - #""" - # TODO - #buf = bytes(self.__preview.data) - #return buf + """ + return self.__preview.get_data() def write_to_file(self, path): """Write the preview image to a file on disk. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.5.0/src/pyexiv2/utils.py new/py3exiv2-0.6.1/src/pyexiv2/utils.py --- old/py3exiv2-0.5.0/src/pyexiv2/utils.py 2019-01-30 08:42:17.000000000 +0100 +++ new/py3exiv2-0.6.1/src/pyexiv2/utils.py 2018-02-02 15:26:42.000000000 +0100 @@ -3,7 +3,7 @@ # ****************************************************************************** # # Copyright (C) 2006-2012 Olivier Tilloy <oliv...@tilloy.net> -# Copyright (C) 2015-2019 Vincent Vande Vyvre <vincent.vandevy...@oqapy.eu> +# Copyright (C) 2015-2018 Vincent Vande Vyvre <vincent.vandevy...@oqapy.eu> # # This file is part of the py3exiv2 distribution. # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3exiv2-0.5.0/src/pyexiv2/xmp.py new/py3exiv2-0.6.1/src/pyexiv2/xmp.py --- old/py3exiv2-0.5.0/src/pyexiv2/xmp.py 2019-01-30 08:43:19.000000000 +0100 +++ new/py3exiv2-0.6.1/src/pyexiv2/xmp.py 2018-05-15 08:52:04.000000000 +0200 @@ -3,7 +3,7 @@ # ****************************************************************************** # # Copyright (C) 2006-2011 Olivier Tilloy <oliv...@tilloy.net> -# Copyright (C) 2015-2019 Vincent Vande Vyvre <vincent.vandevy...@oqapy.eu> +# Copyright (C) 2015-2018 Vincent Vande Vyvre <vincent.vandevy...@oqapy.eu> # # This file is part of the py3exiv2 distribution. #