Skip to content

Commit 6c3f567

Browse files
Build wheels with BMFF support enabled
1 parent 908333d commit 6c3f567

4 files changed

Lines changed: 14 additions & 9 deletions

File tree

.github/workflows/build-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
-DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" \
3636
-DEXIV2_BUILD_SAMPLES=OFF \
3737
-DEXIV2_BUILD_EXIV2_COMMAND=OFF \
38-
-DEXIV2_ENABLE_BMFF=OFF \
38+
-DEXIV2_ENABLE_BMFF=ON \
3939
-GNinja &&
4040
cmake --build . --config Release &&
4141
cmake --build . --target install &&

.github/workflows/build-manylinux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
-DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" \
2929
-DEXIV2_BUILD_SAMPLES=OFF \
3030
-DEXIV2_BUILD_EXIV2_COMMAND=OFF \
31-
-DEXIV2_ENABLE_BMFF=OFF &&
31+
-DEXIV2_ENABLE_BMFF=ON &&
3232
cmake --build . &&
3333
make install &&
3434
cd ../.. &&

.github/workflows/build-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
-DEXIV2_ENABLE_WIN_UNICODE=ON \
5959
-DEXIV2_BUILD_SAMPLES=OFF \
6060
-DEXIV2_BUILD_EXIV2_COMMAND=OFF \
61-
-DEXIV2_ENABLE_BMFF=OFF \
61+
-DEXIV2_ENABLE_BMFF=ON \
6262
-G "Visual Studio 16 2019" -A x64
6363

6464
- name: Compile Exiv2

README.rst

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ Recent versions of SWIG_ can convert this documentation to pydoc_ format in the
5959
Unfortunately some documentation gets lost in the manipulations needed to make a useful interface.
6060
The C++ documentation is still needed in these cases.
6161

62+
Support for bmff files (CR3, HEIF, HEIC, and AVIF)
63+
--------------------------------------------------
64+
65+
Python-exiv2 from version 0.8.3 onwards is built with support for bmff files.
66+
In order to use bmff files in your Python program you need to call the ``enableBMFF`` function.
67+
Please read the Exiv2 `statement on bmff`_ patents before doing so.
68+
6269
Assignment
6370
----------
6471

@@ -101,7 +108,6 @@ For example::
101108
>>>
102109

103110
Before using an iterator you must ensure that it is not equal to the ``end()`` value.
104-
Failure to do so may produce a segmentation fault, just like a C++ program would.
105111

106112
You can iterate over the data in a very C++ like style::
107113

@@ -150,12 +156,10 @@ This allows them to be used in a very Pythonic style::
150156
del data['Iptc.Application2.Keywords']
151157

152158
Warning: segmentation faults
153-
----------------------------
159+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
154160

155-
Many of the libexiv2 objects point to data in other objects.
156-
For example, ``image.exifData()`` returns an object that points to data in ``image``.
157-
The Python interface uses Python objects' reference counting to prevent ``image`` being deleted while its data is being pointed at by another object.
158-
This avoids one possible cause of segfaults.
161+
If an iterator is invalidated, e.g. by deleting the datum it points to, then your Python program may crash with a segmentation fault if you try to use the invalid iterator.
162+
Just as in C++, there is no way to detect that an iterator has become invalid.
159163

160164
There may be other cases where the Python interface doesn't prevent segfaults.
161165
Please let me know if you find any.
@@ -208,4 +212,5 @@ Please email jim@jim-easterbrook.me.uk if you find any problems (or solutions!).
208212
.. _SWIG: http://swig.org/
209213
.. _pydoc: https://docs.python.org/3/library/pydoc.html
210214
.. _Python3: https://www.python.org/
215+
.. _statement on bmff: https://github.com/exiv2/exiv2#2-19
211216
.. _Visual C++: https://wiki.python.org/moin/WindowsCompilers

0 commit comments

Comments
 (0)