Repository: LeoHsiao1/pyexiv2 (language: python)

Issue:
pyexiv2.enableBMFF()启用失败
调用pyexiv2.enableBMFF()返回False，请问是什么情况


Discussion / hints:
好像是 Windows 版的构建包禁用了这个功能，等我调试下

Fix patch:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 73285af..9d24b21 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -4,8 +4,6 @@ name: Build
 
 on:
   push:
-    branches:
-      - master
   workflow_dispatch:
 
 jobs:
@@ -32,8 +30,7 @@ jobs:
         echo  LIB_DIR=`pwd`/pyexiv2/lib                                                           >>  $GITHUB_ENV
         echo  SUB_LIB_DIR=`pwd`/pyexiv2/lib/py${PYTHON_VERSION/./}-${PLATFORM_NAME}               >>  $GITHUB_ENV
 
-    - name: Checkout repository
-      uses: actions/checkout@v2
+    - uses: actions/checkout@v2
 
     - name: Download Exiv2 build
       run: |
@@ -103,8 +100,7 @@ jobs:
         echo  LIB_DIR=`pwd`/pyexiv2/lib                                                           >>  $GITHUB_ENV
         echo  SUB_LIB_DIR=`pwd`/pyexiv2/lib/py${PYTHON_VERSION/./}-${PLATFORM_NAME}               >>  $GITHUB_ENV
 
-    - name: Checkout repository
-      uses: actions/checkout@v2
+    - uses: actions/checkout@v2
 
     - name: Download Exiv2 build
       run: |
@@ -166,8 +162,7 @@ jobs:
       EXIV2_BUILD_EXT: .zip
       PYTHON_VERSION: ${{ matrix.python_version }}
     steps:
-    - name: Checkout repository
-      uses: actions/checkout@v2
+    - uses: actions/checkout@v2
 
     - name: Set environment variables
       shell: cmd
@@ -183,7 +178,9 @@ jobs:
         call env.bat
         curl -O   %EXIV2_BUILDS_URL%
         python -m zipfile -e %EXIV2_BUILD_NAME%%EXIV2_BUILD_EXT% .
-        copy      %EXIV2_DIR%\bin\exiv2.dll   %LIB_DIR%
+
+        :: copy      %EXIV2_DIR%\bin\exiv2.dll   %LIB_DIR%
+        :: Do not use the official current release exiv2.dll as it does not set `EXIV2_ENABLE_BMFF=ON` at compile time.
 
     - name: Set up Python ${{ matrix.python_version }}
       uses: actions/setup-python@v2
diff --git a/.github/workflows/build_exiv2.yml b/.github/workflows/build_exiv2.yml
index 919e949..7a7a092 100644
--- a/.github/workflows/build_exiv2.yml
+++ b/.github/workflows/build_exiv2.yml
@@ -3,20 +3,20 @@ name: Build exiv2
 on:
   workflow_dispatch:
     inputs:
-      refs:
-        description: 'Input a refs of Exiv2 to build'
+      ref:
+        description: 'Input a ref of Exiv2 to build'
         required: true
         default: v0.27.4
 
 jobs:
   job1:
     name: Build on Linux
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-20.04
     steps:
       - uses: actions/checkout@v2
         with:
           repository: Exiv2/exiv2
-          refs: ${{ github.event.inputs.ref }}
+          ref: ${{ github.event.inputs.ref }}
 
       - name: Install dependencies
         run: |
@@ -58,7 +58,7 @@ jobs:
       - uses: actions/checkout@v2
         with:
           repository: Exiv2/exiv2
-          refs: ${{ github.event.inputs.ref }}
+          ref: ${{ github.event.inputs.ref }}
 
       - name: Install dependencies
         run: |
@@ -97,7 +97,7 @@ jobs:
       - uses: actions/checkout@v2
         with:
           repository: Exiv2/exiv2
-          refs: ${{ github.event.inputs.ref }}
+          ref: ${{ github.event.inputs.ref }}
 
       - name: Set up Visual Studio shell
         uses: egor-tensin/vs-shell@v2
diff --git a/pyexiv2/lib/exiv2.dll b/pyexiv2/lib/exiv2.dll
index 439c19e..d565ad4 100644
Binary files a/pyexiv2/lib/exiv2.dll and b/pyexiv2/lib/exiv2.dll differ
diff --git a/sample.py b/sample.py
index a74665d..cb4e3e0 100644
--- a/sample.py
+++ b/sample.py
@@ -1,8 +1,3 @@
-import pyexiv2
-
-pyexiv2.exiv2api.version()
-
-
 from pyexiv2 import Image
 
 img = Image(r'.\pyexiv2\tests\1.jpg')
@@ -17,9 +12,9 @@
 img.modify_exif({'Exif.Image.Make': 'test-中文-', 'Exif.Image.Rating': ''})
 img.read_exif()
 
-dict1 = {"Xmp.xmp.CreateDate": "2019-06-23T19:45:17.834",
+dic1 = {"Xmp.xmp.CreateDate": "2019-06-23T19:45:17.834",
          "Xmp.xmp.Rating": None,
          "Xmp.dc.subject": ["tag1", "tag2", "tag3"]}
-img.modify_xmp(dict1)
+img.modify_xmp(dic1)
 
 img.close()


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 0697dd0..7c1b7d8 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -16,8 +16,7 @@ jobs:
         python_version: [3.5, 3.6, 3.7, 3.8, 3.9]
     runs-on: ${{ matrix.os }}
     steps:
-    - name: Checkout repository
-      uses: actions/checkout@v2
+    - uses: actions/checkout@v2
 
     - name: Set up Python ${{ matrix.python_version }}
       uses: actions/setup-python@v2
diff --git a/.github/workflows/test_package.yml b/.github/workflows/test_package.yml
index c005603..d576fc0 100644
--- a/.github/workflows/test_package.yml
+++ b/.github/workflows/test_package.yml
@@ -17,10 +17,7 @@ jobs:
         python_version: [3.5, 3.6, 3.7, 3.8, 3.9]
     runs-on: ${{ matrix.os }}
     steps:
-    - name: Checkout repository
-      uses: actions/checkout@v2
-      with:
-        ref: master
+    - uses: actions/checkout@v2
 
     - name: Set up Python ${{ matrix.python_version }}
       uses: actions/setup-python@v2