Skip to content

Commit 681c3ad

Browse files
Merge pull request #22 from jim-easterbrook/v0.16
V0.16
2 parents a57fe50 + afacb8e commit 681c3ad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+16277
-12119
lines changed

.github/workflows/build-linux-27.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
CIBW_BEFORE_ALL: >
3333
yum install -y zlib-devel expat-devel gettext-devel
3434
libcurl-devel libssh-devel &&
35+
localedef -c -i de_DE -f UTF-8 de_DE.UTF-8 &&
3536
cd libexiv2 &&
3637
cmake -B build-linux -D CMAKE_BUILD_TYPE=Release
3738
-D CMAKE_INSTALL_PREFIX=build-linux/install

.github/workflows/build-linux-28.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
libcurl-devel libssh-devel brotli-devel &&
4141
rpm -Uvh inih*.rpm &&
4242
dnf install inih inih-devel &&
43+
localedef -c -i de_DE -f UTF-8 de_DE.UTF-8 &&
4344
pip install ninja &&
4445
cd libexiv2 &&
4546
cmake --preset linux-release

.github/workflows/build-macos-arm-27.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on: workflow_dispatch
33

44
jobs:
55
build:
6-
runs-on: macos-latest
6+
runs-on: flyci-macos-large-latest-m1
77
steps:
88
- name: Check out repository code
99
uses: actions/checkout@v4
@@ -20,6 +20,9 @@ jobs:
2020
tar -xzf exiv2.tar.gz
2121
mv exiv2-0.27.7-Source libexiv2
2222
23+
- name: Install pipx
24+
run: pip install pipx
25+
2326
- name: Build wheels
2427
uses: pypa/[email protected]
2528
env:
@@ -29,17 +32,21 @@ jobs:
2932
CIBW_TEST_COMMAND: >
3033
python -m exiv2 -v &&
3134
python -m unittest discover {project}/tests -v
35+
CIBW_TEST_SKIP: cp38-*
3236
CIBW_BEFORE_ALL: >
33-
brew install ninja &&
37+
brew install ninja libssh curl &&
3438
cd libexiv2 &&
3539
cmake . -B build-macos -DCMAKE_BUILD_TYPE=Release
3640
-D CMAKE_INSTALL_PREFIX=build-macos/install
3741
-D CMAKE_CXX_FLAGS="-Wno-deprecated-declarations"
3842
-D EXIV2_BUILD_SAMPLES=OFF
3943
-D EXIV2_BUILD_EXIV2_COMMAND=OFF
4044
-D EXIV2_ENABLE_BMFF=ON
41-
-D EXIV2_ENABLE_NLS=OFF
45+
-D EXIV2_ENABLE_NLS=ON
4246
-D EXIV2_ENABLE_VIDEO=ON
47+
-D EXIV2_ENABLE_WEBREADY=ON
48+
-D EXIV2_ENABLE_CURL=ON
49+
-D EXIV2_ENABLE_SSH=ON
4350
-D CMAKE_CXX_STANDARD=98
4451
-D CMAKE_OSX_ARCHITECTURES=arm64
4552
-G Ninja &&

.github/workflows/build-windows-27.yml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@ jobs:
88
- name: Check out repository code
99
uses: actions/checkout@v4
1010

11+
- name: Fetch Gettext
12+
run: >
13+
c:\msys64\usr\bin\wget.exe -nv
14+
https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.21-v1.16/gettext0.21-iconv1.16-shared-64.zip
15+
-O gettext.zip
16+
17+
- name: Extract Gettext
18+
shell: bash
19+
run: |
20+
mkdir gettext
21+
cd gettext
22+
unzip ../gettext.zip
23+
1124
- name: Fetch Exiv2 source
1225
run: >
1326
c:\msys64\usr\bin\wget.exe -nv
@@ -19,13 +32,19 @@ jobs:
1932
run: |
2033
tar -xzf exiv2.tar.gz
2134
mv exiv2-0.27.7-Source libexiv2
35+
# tweaks to allow NLS
36+
rm libexiv2/cmake/FindIconv.cmake
37+
echo -e "24a25\n> self.requires('libgettext/0.21')" |
38+
c:/msys64/usr/bin/patch.exe libexiv2/conanfile.py
2239
2340
- name: Build wheels
2441
uses: pypa/[email protected]
2542
env:
2643
CIBW_ARCHS: auto64
2744
CIBW_SKIP: pp3*
28-
CIBW_ENVIRONMENT: EXIV2_ROOT=libexiv2/build-msvc/install
45+
CIBW_ENVIRONMENT: |
46+
EXIV2_ROOT=libexiv2/build-msvc/install
47+
PATH="$PATH;$(pwd)\\gettext\\bin"
2948
CIBW_TEST_COMMAND: >
3049
python -m exiv2 -v &&
3150
python -m unittest discover {project}/tests -v
@@ -34,16 +53,17 @@ jobs:
3453
cd libexiv2 &&
3554
conan install . -of build-msvc -if build-msvc -o unitTests=False
3655
-o iconv=True -o webready=True -b missing &&
37-
cmake -B build-msvc -DCMAKE_BUILD_TYPE=Release
38-
-DCMAKE_INSTALL_PREFIX=build-msvc/install
39-
-DEXIV2_ENABLE_WIN_UNICODE=ON
40-
-DEXIV2_BUILD_SAMPLES=OFF
41-
-DEXIV2_BUILD_EXIV2_COMMAND=OFF
42-
-DEXIV2_ENABLE_BMFF=ON
43-
-DEXIV2_ENABLE_NLS=OFF
44-
-DEXIV2_ENABLE_VIDEO=ON
45-
-DEXIV2_ENABLE_WEBREADY=ON
46-
-DCMAKE_CXX_STANDARD=98
56+
cmake -B build-msvc
57+
-D CMAKE_BUILD_TYPE=Release
58+
-D CMAKE_INSTALL_PREFIX=build-msvc/install
59+
-D EXIV2_ENABLE_WIN_UNICODE=ON
60+
-D EXIV2_BUILD_SAMPLES=OFF
61+
-D EXIV2_BUILD_EXIV2_COMMAND=OFF
62+
-D EXIV2_ENABLE_BMFF=ON
63+
-D EXIV2_ENABLE_NLS=ON
64+
-D EXIV2_ENABLE_VIDEO=ON
65+
-D EXIV2_ENABLE_WEBREADY=ON
66+
-D CMAKE_CXX_STANDARD=98
4767
-G "Visual Studio 16 2019" -A x64 &&
4868
cmake --build build-msvc --config Release &&
4969
cmake --install build-msvc --config Release

.github/workflows/build-windows-28.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@ jobs:
88
- name: Check out repository code
99
uses: actions/checkout@v4
1010

11+
- name: Fetch Gettext
12+
run: >
13+
c:\msys64\usr\bin\wget.exe -nv
14+
https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.21-v1.16/gettext0.21-iconv1.16-shared-64.zip
15+
-O gettext.zip
16+
17+
- name: Extract Gettext
18+
shell: bash
19+
run: |
20+
mkdir gettext
21+
cd gettext
22+
unzip ../gettext.zip
23+
1124
- name: Fetch Exiv2 source
1225
run: >
1326
c:\msys64\usr\bin\wget.exe -nv
@@ -19,13 +32,18 @@ jobs:
1932
run: |
2033
tar -xzf exiv2.tar.gz
2134
mv exiv2-0.28.1 libexiv2
35+
# tweaks to allow NLS
36+
echo -e "24a25\n> self.requires('libgettext/0.21')" |
37+
c:/msys64/usr/bin/patch.exe libexiv2/conanfile.py
2238
2339
- name: Build wheels
2440
uses: pypa/[email protected]
2541
env:
2642
CIBW_ARCHS: auto64
2743
CIBW_SKIP: pp3*
28-
CIBW_ENVIRONMENT: EXIV2_ROOT=libexiv2/build-msvc/install
44+
CIBW_ENVIRONMENT: |
45+
EXIV2_ROOT=libexiv2/build-msvc/install
46+
PATH="$PATH;$(pwd)\\gettext\\bin"
2947
CIBW_TEST_COMMAND: >
3048
python -m exiv2 -v &&
3149
python -m unittest discover {project}/tests -v
@@ -37,6 +55,7 @@ jobs:
3755
-D EXIV2_BUILD_SAMPLES=OFF
3856
-D EXIV2_BUILD_EXIV2_COMMAND=OFF
3957
-D EXIV2_BUILD_UNIT_TESTS=OFF
58+
-D EXIV2_ENABLE_NLS=ON
4059
-G "Visual Studio 16 2019" &&
4160
cmake --build build-msvc --config Release &&
4261
cmake --install build-msvc --config Release &&

CHANGELOG.txt

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
python-exiv2 - Python interface to libexiv2
22
http://github.com/jim-easterbrook/python-exiv2
3-
Copyright (C) 2022-23 Jim Easterbrook [email protected]
3+
Copyright (C) 2022-24 Jim Easterbrook [email protected]
44

55
This program is free software: you can redistribute it and/or
66
modify it under the terms of the GNU General Public License as
@@ -17,16 +17,18 @@ along with this program. If not, see
1717
<http://www.gnu.org/licenses/>.
1818

1919
Changes in v0.16.0:
20-
*/ API change: DateValue.getDate() returns Python dict.
21-
*/ API change: TimeValue.getTime() returns Python dict.
22-
*/ Deprecated: exiv2.Date and exiv2.Time objects.
23-
*/ Add buffer interface to PreviewImage
24-
*/ Set datum value from Python object directly instead of via string.
25-
*/ Add enums for LogMsg.Level
26-
*/ Moved Position enum to BasicIo class.
27-
*/ Moved CharsetId enum to CommentValue class.
28-
*/ Moved XmpArrayType and XmpStruct enums to XmpValue class.
29-
*/ More exiv2 structs are iterable for easy conversion to Python dict.
20+
1/ Binary wheels incorporate libexiv2 v0.28.1.
21+
2/ Include native language support in Windows binary wheel builds.
22+
3/ API change: DateValue.getDate() returns Python dict.
23+
4/ API change: TimeValue.getTime() returns Python dict.
24+
5/ Deprecated: exiv2.Date and exiv2.Time objects.
25+
6/ Added buffer interface to PreviewImage
26+
7/ Set datum value from Python object directly instead of via string.
27+
8/ Moved Position enum to BasicIo class.
28+
9/ Moved CharsetId enum to CommentValue class.
29+
10/ Moved XmpArrayType and XmpStruct enums to XmpValue class.
30+
11/ Added enums for LogMsg.Level
31+
12/ More exiv2 structs are iterable for easy conversion to Python dict.
3032

3133
Changes in v0.15.0:
3234
1/ Added __version_tuple__ for easy runtime version testing.

README.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ Here is an example of its use:
4444
4545
Please see `<USAGE.rst>`_ for more help with using the Python interface to libexiv2.
4646
47+
Transition to libexiv2 v0.28.x
48+
------------------------------
49+
50+
Before python-exiv2 v0.16 the "binary wheels" available from PyPI_ incorporated libexiv2 v0.27.7 or earlier.
51+
Binary wheels for python-exiv2 v0.16.0 incorporate libexiv2 v0.28.1, and those for for python-exiv2 v0.16.1 incorporate libexiv2 v0.27.7.
52+
This allows you to test your software with the new version of libexiv2 by explicitly installing python-exiv2 v0.16.0::
53+
54+
$ pip install --user python-exiv2==0.16.0
55+
56+
There are some changes in the libexiv2 API between v0.27.7 and v0.28.x.
57+
Future versions of python-exiv2 will all incorporate libexiv2 v0.28.x, so please test your software with the changed API.
58+
4759
Documentation
4860
-------------
4961

src/interface/error.i

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,6 @@
2222

2323
%include "std_except.i"
2424

25-
// Make all exiv2's localised strings UTF-8
26-
%{
27-
#ifdef EXV_ENABLE_NLS
28-
#include "libintl.h"
29-
#endif
30-
%}
31-
%init %{
32-
#ifdef EXV_ENABLE_NLS
33-
bind_textdomain_codeset("exiv2", "UTF-8");
34-
#endif
35-
%}
36-
3725

3826
// Set Python logger as Exiv2 log handler
3927
%{

src/interface/types.i

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,20 @@
3636
// (types.hpp includes exiv2's localisation stuff)
3737
%{
3838
#ifdef EXV_ENABLE_NLS
39+
#if defined _WIN32 && !defined __CYGWIN__
40+
// Avoid needing to find libintl.h probably installed with Conan
41+
extern "C" {
42+
extern char* libintl_bindtextdomain(const char* domainname,
43+
const char* dirname);
44+
static inline char* bindtextdomain(const char* __domainname,
45+
const char* __dirname) {
46+
return libintl_bindtextdomain(__domainname, __dirname);
47+
}
48+
}
49+
#else
3950
#include "libintl.h"
4051
#endif
52+
#endif // EXV_ENABLE_NLS
4153
%}
4254
%inline %{
4355
void _set_locale_dir(const char* dirname) {

src/swig-0_27_0/basicio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file was automatically generated by SWIG (https://www.swig.org).
2-
# Version 4.1.1
2+
# Version 4.2.0
33
#
44
# Do not make changes to this file unless you know what you are doing - modify
55
# the SWIG interface file instead.

0 commit comments

Comments
 (0)