Skip to content

Commit

Permalink
Merge pull request #38 from jim-easterbrook/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
jim-easterbrook authored Aug 2, 2024
2 parents 829065a + 84e1210 commit 142b908
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-macos-28.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: workflow_dispatch

jobs:
build:
runs-on: macos-latest
runs-on: macos-13
steps:
- name: Check out repository code
uses: actions/checkout@v4
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/build-macos-arm-28.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: workflow_dispatch

jobs:
build:
runs-on: flyci-macos-large-latest-m1
runs-on: macos-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
Expand All @@ -20,9 +20,6 @@ jobs:
tar -xzf exiv2.tar.gz
mv exiv2-0.28.3 libexiv2
- name: Install pipx
run: pip install pipx

- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
env:
Expand Down
44 changes: 29 additions & 15 deletions .github/workflows/build-windows-28.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,45 @@ jobs:
echo -e "24a25\n> self.requires('libgettext/0.21')" |
c:/msys64/usr/bin/patch.exe libexiv2/conanfile.py
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Install cmake
uses: jwlawson/actions-setup-cmake@v2

- name: Install ninja
uses: seanmiddleditch/gha-setup-ninja@master

- name: Compile Exiv2
env:
PATH: "${{ github.workspace }}\\gettext\\bin"
run: >
pip install conan==1.59.0 &&
cd libexiv2 &&
cmake --preset msvc
-D CMAKE_BUILD_TYPE=Release
-D EXIV2_BUILD_SAMPLES=OFF
-D EXIV2_BUILD_EXIV2_COMMAND=OFF
-D EXIV2_BUILD_UNIT_TESTS=OFF
-D EXIV2_ENABLE_NLS=ON
-D EXIV2_ENABLE_FILESYSTEM_ACCESS=ON
-G "Visual Studio 16 2019" &&
cmake --build build-msvc --config Release &&
cmake --install build-msvc --config Release &&
copy build-msvc\bin\libcurl.dll build-msvc\install\bin
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_ARCHS: auto64
CIBW_SKIP: pp3*
CIBW_ENVIRONMENT: |
EXIV2_ROOT=libexiv2/build-msvc/install
PATH="$PATH;$(pwd)\\gettext\\bin"
CIBW_TEST_COMMAND: >
python -m exiv2 -v &&
python -m unittest discover {project}/tests -v
CIBW_BEFORE_ALL: >
pip install conan==1.59.0 &&
cd libexiv2 &&
cmake --preset msvc
-D CMAKE_BUILD_TYPE=Release
-D EXIV2_BUILD_SAMPLES=OFF
-D EXIV2_BUILD_EXIV2_COMMAND=OFF
-D EXIV2_BUILD_UNIT_TESTS=OFF
-D EXIV2_ENABLE_NLS=ON
-D EXIV2_ENABLE_FILESYSTEM_ACCESS=ON
-G "Visual Studio 16 2019" &&
cmake --build build-msvc --config Release &&
cmake --install build-msvc --config Release &&
copy build-msvc\bin\libcurl.dll build-msvc\install\bin
- name: Store results
uses: actions/upload-artifact@v4
Expand Down
7 changes: 3 additions & 4 deletions tests/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,9 @@ def test_localisation(self):
self.assertEqual(cm.output, [
'WARNING:exiv2:Ungültiger Zeichensatz: "invalid"'])
with self.assertRaises(exiv2.Exiv2Error) as cm:
image = exiv2.ImageFactory.open('non-existing.jpg')
self.assertEqual(cm.exception.message.split(':')[:2],
['non-existing.jpg',
' Die Datenquelle konnte nicht geöffnet werden'])
image = exiv2.ImageFactory.open(bytes())
self.assertEqual(cm.exception.message,
'Die Eingabedaten konnten nicht gelesen werden.')
# clear locale
name = 'en_US.UTF-8'
os.environ['LC_ALL'] = name
Expand Down

0 comments on commit 142b908

Please sign in to comment.