From bb2f838e7b819ef8d0a4eafe55a30884a04f2f87f1faa77faaa3ca1c7b5849dd Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 25 Nov 2024 23:25:42 +0000 Subject: [PATCH 1/7] - Update to 0.17.1: * Update README and INSTALL docs * Allow linux libdir name to be 'lib64' or 'lib' * Test localised exception with non-ASCII characters - Updates from 0.17.0: * API change: derived classes of BasicIo are omitted from Python. * enableBMFF() function is deprecated. * Documentation is available on https://python-exiv2.readthedocs.io/ - Updates from 0.16.2: * Removed AnyError alias of Exiv2Error exception. * Metadatum.print() method is no longer renamed to _print. * Improved handling of enums: * Enum results are returned as Python enum instead of int. * Passing ints as enum parameters is deprecated. * Added dict-like behaviour to "data" structs. * Log handlers can be set/cleared from Python. * SWIG v4.1.0 or later required to run SWIG. - Updates from 0.16.0: * Include native language support in Windows binary wheel builds. * API change: DateValue.getDate() returns Python dict. * API change: TimeValue.getTime() returns Python dict. * Deprecated: exiv2.Date and exiv2.Time objects. * Added buffer interface to PreviewImage * Set datum value from Python object directly instead of via string. * Moved Position enum to BasicIo class. * Moved CharsetId enum to CommentValue class. * Moved XmpArrayType and XmpStruct enums to XmpValue class. * Added enums for LogMsg.Level * More exiv2 structs are iterable for easy conversion to Python dict. - Updates from 0.15.0: * Added __version_tuple__ for easy runtime version testing. * exiv2.testVersion() can be called from Python. * exiv2.DataBuf can be created from Python data. * Most data() methods return a Python memoryview. * exiv2.DataBuf and exiv2.BasicIo have writeable Python buffer interface. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-exiv2?expand=0&rev=26 --- .gitattributes | 23 +++++++ .gitignore | 1 + 0.14.1.tar.gz | 3 + 0.17.1.tar.gz | 3 + python-exiv2.changes | 145 +++++++++++++++++++++++++++++++++++++++++++ python-exiv2.spec | 61 ++++++++++++++++++ 6 files changed, 236 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 0.14.1.tar.gz create mode 100644 0.17.1.tar.gz create mode 100644 python-exiv2.changes create mode 100644 python-exiv2.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0.14.1.tar.gz b/0.14.1.tar.gz new file mode 100644 index 0000000..2745ecc --- /dev/null +++ b/0.14.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6f63e9343ce12c880f8b8654b94188285e31625b8a4396daac545c7de2b7457 +size 2237216 diff --git a/0.17.1.tar.gz b/0.17.1.tar.gz new file mode 100644 index 0000000..e743c2b --- /dev/null +++ b/0.17.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2984f8832c71dc206edd1dfe9b90b6cef34c9bafa1a8311baa284f8161602ace +size 1621149 diff --git a/python-exiv2.changes b/python-exiv2.changes new file mode 100644 index 0000000..7006a1d --- /dev/null +++ b/python-exiv2.changes @@ -0,0 +1,145 @@ +------------------------------------------------------------------- +Sun Nov 24 09:33:03 UTC 2024 - Joshua Smith + +- Update to 0.17.1: + * Update README and INSTALL docs + * Allow linux libdir name to be 'lib64' or 'lib' + * Test localised exception with non-ASCII characters +- Updates from 0.17.0: + * API change: derived classes of BasicIo are omitted from Python. + * enableBMFF() function is deprecated. + * Documentation is available on + https://python-exiv2.readthedocs.io/ +- Updates from 0.16.2: + * Removed AnyError alias of Exiv2Error exception. + * Metadatum.print() method is no longer renamed to _print. + * Improved handling of enums: + * Enum results are returned as Python enum instead of int. + * Passing ints as enum parameters is deprecated. + * Added dict-like behaviour to "data" structs. + * Log handlers can be set/cleared from Python. + * SWIG v4.1.0 or later required to run SWIG. +- Updates from 0.16.0: + * Include native language support in Windows binary wheel builds. + * API change: DateValue.getDate() returns Python dict. + * API change: TimeValue.getTime() returns Python dict. + * Deprecated: exiv2.Date and exiv2.Time objects. + * Added buffer interface to PreviewImage + * Set datum value from Python object directly instead of via + string. + * Moved Position enum to BasicIo class. + * Moved CharsetId enum to CommentValue class. + * Moved XmpArrayType and XmpStruct enums to XmpValue class. + * Added enums for LogMsg.Level + * More exiv2 structs are iterable for easy conversion to Python + dict. +- Updates from 0.15.0: + * Added __version_tuple__ for easy runtime version testing. + * exiv2.testVersion() can be called from Python. + * exiv2.DataBuf can be created from Python data. + * Most data() methods return a Python memoryview. + * exiv2.DataBuf and exiv2.BasicIo have writeable Python buffer + interface. + +------------------------------------------------------------------- +Wed Oct 11 15:14:43 UTC 2023 - Ondřej Súkup + +- fix files section + +------------------------------------------------------------------- +Wed Oct 11 09:53:14 UTC 2023 - Matej Cepl + +- Update to 0.14.1: + - Added enums for XmpStruct and XmpArrayType + - Added method for copy-free access to XmpTextValue raw data. + - Fix occasional segfault with Image.io() of in-memory image + data. + - Add data() method to access Exiv2::StringValueBase raw bytes. + - Enable video support in binary wheels. + - Automatically cast Exiv2::Value return values to correct + type. + - Exiv2::byte* return values are converted to a simple buffer + object. + - Deprecated some superseded features. Use 'python -Wd' when + testing. + - Exiv2's Date & Time structs can be used from Python. + - Removed Value.downCast methods deprecated in v0.7.0. + - Reduced probability of segfaults by keeping references to + other objects. + - Fix iterator bug introduced in v0.10.0. (Issue #7.) +- Remove now superfluous py3exiv2-link-boost.patch + +------------------------------------------------------------------- +Thu Oct 5 11:22:05 UTC 2023 - Matej Cepl + +- Update to 0.12.0 + - Fix bug #2027823 (Compilation errors with exiv2-0.28) +- Remove the exiv2_0-28-0.patch patch again. + +------------------------------------------------------------------- +Thu Aug 10 21:33:24 UTC 2023 - Matej Cepl + +- Update to 0.12.3: + - upstream doesn't release proper changelog + +------------------------------------------------------------------- +Fri Aug 4 23:06:13 UTC 2023 - Matej Cepl + +- Add exiv2_0-28-0.patch making the package compatible with the + latest exiv2 0.28 (lp#2027823). + +------------------------------------------------------------------- +Thu Oct 13 17:56:29 UTC 2022 - Axel Braun + +- version 0.11.0 + no changelog + +------------------------------------------------------------------- +Thu Jul 8 17:14:26 UTC 2021 - Andreas Schneider + +- Update to version 0.9.3 + * Add support for tag Xmp.mwg-rs.Regions/mwg-rs: + +------------------------------------------------------------------- +Tue Oct 20 06:39:52 UTC 2020 - Andreas Schneider + +- Update to version 0.8.0 + * Add XmpSeq support + * Add a datetime conversion to Python with iso format, update some unittests +- Added py3exiv2-link-boost.patch + +------------------------------------------------------------------- +Tue Jul 2 14:47:21 UTC 2019 - Tomáš Chvátal + +- Update to 0.7.1: + * Various fixes to work with new exiv releases + +------------------------------------------------------------------- +Mon Apr 8 19:10:25 UTC 2019 - Andreas Schneider + +- Update to version 0.6.1 + * Add the streaming of the preview data + +------------------------------------------------------------------- +Thu Jan 31 14:57:44 UTC 2019 - Andreas Schneider + +- Update to version 0.5.0 + * Several fixes for exiv2-0.27 +- Removed exiv2-1.0.27.patch (fixed upstream) + +------------------------------------------------------------------- +Tue Jan 29 11:22:25 UTC 2019 - Tomáš Chvátal + +- Add patch to build with latest exiv2 releases: + * exiv2-1.0.27.patch + +------------------------------------------------------------------- +Thu Jun 28 09:38:11 UTC 2018 - asn@cryptomilk.org + +- Update to version 0.3.0 + * Add some convenient functions + +------------------------------------------------------------------- +Sun May 6 07:55:37 UTC 2018 - asn@cryptomilk.org + +- Initial package diff --git a/python-exiv2.spec b/python-exiv2.spec new file mode 100644 index 0000000..2ef70cb --- /dev/null +++ b/python-exiv2.spec @@ -0,0 +1,61 @@ +# +# spec file for package python-exiv2 +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: python-exiv2 +Version: 0.17.1 +Release: 0 +Summary: Python3 bindings for the exiv2 library +License: GPL-3.0-only +Group: Development/Languages/Python +URL: https://launchpad.net/py3exiv2 +Source: https://github.com/jim-easterbrook/python-exiv2/archive/refs/tags/%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: libboost_python3-devel +BuildRequires: pkgconfig +BuildRequires: python-rpm-macros +BuildRequires: pkgconfig(exiv2) +%python_subpackages + +%description +python3-exiv2 is a Python 3 binding to exiv2, the C++ library for manipulation +of EXIF, IPTC and XMP image metadata. It is a python 3 module that allows your +scripts to read and write metadata (EXIF, IPTC, XMP, thumbnails) embedded in +image files (JPEG, TIFF, ...). + +It is designed as a high-level interface to the functionalities offered by +libexiv2. Using python’s built-in data types and standard modules, it provides +easy manipulation of image metadata. + +%prep +%autosetup -p1 + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%files %{python_files} +%{python_sitearch}/exiv2 +%{python_sitearch}/exiv2-%{version}*-info + +%changelog From c83ff845e7e3f666f8b1eef12ba4c6dac0186e0f15d27b223efe79688dbb5c0b Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 25 Nov 2024 23:34:41 +0000 Subject: [PATCH 2/7] - Enable tests. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-exiv2?expand=0&rev=27 --- python-exiv2.changes | 5 +++++ python-exiv2.spec | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/python-exiv2.changes b/python-exiv2.changes index 7006a1d..d3e6bb5 100644 --- a/python-exiv2.changes +++ b/python-exiv2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Nov 25 23:34:32 UTC 2024 - Matej Cepl + +- Enable tests. + ------------------------------------------------------------------- Sun Nov 24 09:33:03 UTC 2024 - Joshua Smith diff --git a/python-exiv2.spec b/python-exiv2.spec index 2ef70cb..511861d 100644 --- a/python-exiv2.spec +++ b/python-exiv2.spec @@ -25,6 +25,7 @@ Group: Development/Languages/Python URL: https://launchpad.net/py3exiv2 Source: https://github.com/jim-easterbrook/python-exiv2/archive/refs/tags/%{version}.tar.gz BuildRequires: %{python_module devel} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: gcc-c++ @@ -54,6 +55,9 @@ easy manipulation of image metadata. %python_install %python_expand %fdupes %{buildroot}%{$python_sitearch} +%check +%pytest_arch + %files %{python_files} %{python_sitearch}/exiv2 %{python_sitearch}/exiv2-%{version}*-info From 4bcc4c44b40c5b8a688c10742ba6b256f071f8ff9b275f8e1a9c8cb2298bc289 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 25 Nov 2024 23:48:43 +0000 Subject: [PATCH 3/7] We actually do not need pytest. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-exiv2?expand=0&rev=28 --- python-exiv2.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python-exiv2.spec b/python-exiv2.spec index 511861d..0c7790c 100644 --- a/python-exiv2.spec +++ b/python-exiv2.spec @@ -25,7 +25,6 @@ Group: Development/Languages/Python URL: https://launchpad.net/py3exiv2 Source: https://github.com/jim-easterbrook/python-exiv2/archive/refs/tags/%{version}.tar.gz BuildRequires: %{python_module devel} -BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: gcc-c++ @@ -56,7 +55,7 @@ easy manipulation of image metadata. %python_expand %fdupes %{buildroot}%{$python_sitearch} %check -%pytest_arch +%pyunittest_arch discover -v tests/ %files %{python_files} %{python_sitearch}/exiv2 From ba8915349db161c39a15c85dd495de8d4cfe05071ed77d0469c640ba8d40e172 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 26 Nov 2024 01:54:50 +0000 Subject: [PATCH 4/7] - Fix building. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-exiv2?expand=0&rev=29 --- python-exiv2.changes | 1 + python-exiv2.spec | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/python-exiv2.changes b/python-exiv2.changes index d3e6bb5..550e863 100644 --- a/python-exiv2.changes +++ b/python-exiv2.changes @@ -1,6 +1,7 @@ ------------------------------------------------------------------- Mon Nov 25 23:34:32 UTC 2024 - Matej Cepl +- Fix building. - Enable tests. ------------------------------------------------------------------- diff --git a/python-exiv2.spec b/python-exiv2.spec index 0c7790c..30e015d 100644 --- a/python-exiv2.spec +++ b/python-exiv2.spec @@ -22,10 +22,12 @@ Release: 0 Summary: Python3 bindings for the exiv2 library License: GPL-3.0-only Group: Development/Languages/Python -URL: https://launchpad.net/py3exiv2 +URL: https://github.com/jim-easterbrook/python-exiv2 Source: https://github.com/jim-easterbrook/python-exiv2/archive/refs/tags/%{version}.tar.gz BuildRequires: %{python_module devel} +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: libboost_python3-devel @@ -48,10 +50,10 @@ easy manipulation of image metadata. %autosetup -p1 %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitearch} %check From 6bc82b460b9d89186e263f211d9b6e29a3441276d2bff8e83ff8c5752a820c77 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 26 Nov 2024 01:58:59 +0000 Subject: [PATCH 5/7] Fix SLE-15 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-exiv2?expand=0&rev=30 --- python-exiv2.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python-exiv2.spec b/python-exiv2.spec index 30e015d..a35210a 100644 --- a/python-exiv2.spec +++ b/python-exiv2.spec @@ -16,6 +16,7 @@ # +%{?sle15_python_module_pythons} Name: python-exiv2 Version: 0.17.1 Release: 0 From ab9672b2e98f640bd7a47010d8d23eb0927a1b5938afc266befa776de07a4733 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 26 Nov 2024 02:17:11 +0000 Subject: [PATCH 6/7] WIP OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-exiv2?expand=0&rev=31 --- python-exiv2.spec | 4 ++++ skip_network_tests.patch | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 skip_network_tests.patch diff --git a/python-exiv2.spec b/python-exiv2.spec index a35210a..250b24b 100644 --- a/python-exiv2.spec +++ b/python-exiv2.spec @@ -25,6 +25,9 @@ License: GPL-3.0-only Group: Development/Languages/Python URL: https://github.com/jim-easterbrook/python-exiv2 Source: https://github.com/jim-easterbrook/python-exiv2/archive/refs/tags/%{version}.tar.gz +# PATCH-FIX-UPSTREAM skip_network_tests.patch bsc#[0-9]+ mcepl@suse.com +# this patch makes things totally awesome +Patch0: skip_network_tests.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} @@ -58,6 +61,7 @@ easy manipulation of image metadata. %python_expand %fdupes %{buildroot}%{$python_sitearch} %check +export NONET=1 %pyunittest_arch discover -v tests/ %files %{python_files} diff --git a/skip_network_tests.patch b/skip_network_tests.patch new file mode 100644 index 0000000..960ab5c --- /dev/null +++ b/skip_network_tests.patch @@ -0,0 +1,14 @@ +--- + tests/test_basicio.py | 1 + + 1 file changed, 1 insertion(+) + +--- a/tests/test_basicio.py ++++ b/tests/test_basicio.py +@@ -33,6 +33,7 @@ class TestBasicIoModule(unittest.TestCas + cls.image_path = os.path.join(test_dir, 'image_02.jpg') + cls.data = b'The quick brown fox jumps over the lazy dog' + ++ @unittest.skipIf('NONET' in os.environ, 'Requires network access') + @unittest.skipUnless(exiv2.versionInfo()['EXV_USE_CURL'], + 'CurlIo not included') + def test_CurlIo(self): From 4f17f89e584c041b63fb4b5b8f5f22ac6dea5253b9b312d680f3835bc94eadc2 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 28 Nov 2024 17:58:42 +0000 Subject: [PATCH 7/7] - Fix building - Enable tests - Add skip_network_tests.patch to mark network-requiring tests and skip them OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-exiv2?expand=0&rev=32 --- python-exiv2.changes | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python-exiv2.changes b/python-exiv2.changes index 550e863..df16bb2 100644 --- a/python-exiv2.changes +++ b/python-exiv2.changes @@ -1,8 +1,10 @@ ------------------------------------------------------------------- Mon Nov 25 23:34:32 UTC 2024 - Matej Cepl -- Fix building. -- Enable tests. +- Fix building +- Enable tests +- Add skip_network_tests.patch to mark network-requiring tests + and skip them ------------------------------------------------------------------- Sun Nov 24 09:33:03 UTC 2024 - Joshua Smith