Skip to content

Commit 7f4fcb6

Browse files
authored
Merge pull request #166 from LeoHsiao1/dev
Ready to release v2.15.4
2 parents ae6242c + 0ea90a3 commit 7f4fcb6

File tree

7 files changed

+67
-110
lines changed

7 files changed

+67
-110
lines changed

.github/workflows/make_package.sh

Lines changed: 0 additions & 92 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 62 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,43 +16,92 @@ jobs:
1616
release:
1717
runs-on: ubuntu-22.04
1818
steps:
19-
- name: Download compiled files
19+
- uses: actions/checkout@v4
20+
21+
- name: Download artifacts
2022
uses: actions/download-artifact@v4
2123
with:
2224
run-id: ${{ inputs.last_build_id }}
23-
path: compiled/
25+
path: artifacts/
2426
# A token with actions:read permissions to download artifacts from another workflow run.
2527
github-token: ${{ secrets.GITHUB_TOKEN }}
2628

27-
- name: List compiled files
29+
- name: List artifacts
30+
run: |
31+
tree -sh artifacts/
32+
33+
- name: Set up Python3.8
34+
uses: actions/setup-python@v4
35+
with:
36+
python-version: 3.8
37+
38+
- name: Install dependencies
2839
run: |
29-
tree -sh compiled/
40+
python -m pip install setuptools wheel twine
3041
3142
- name: Make wheels
3243
run: |
33-
...todo
44+
for artifact_name in `ls artifacts/`
45+
do
46+
cd ${{ github.workspace }}
47+
git reset --hard
48+
git clean -dfx build pyexiv2 pyexiv2.egg-info
49+
rm -rf pyexiv2/tests/
50+
51+
echo "- Processing ${artifact_name}"
52+
mv artifacts/${artifact_name}/* pyexiv2/lib/
53+
54+
fields=(${artifact_name//-/ })
55+
py_version=`echo ${fields[0]} | sed 's#\.##g' | sed 's#py##g'`
56+
exiv2_platform_name=${fields[1]}-${fields[2]}
57+
58+
# ${exiv2_platform_name} depends on the runner.os in https://github.com/Exiv2/exiv2/blob/main/.github/workflows/release.yml
59+
# ${plat_name} depends on the platform tag in https://packaging.python.org/en/latest/specifications/platform-compatibility-tags
60+
if [ ${exiv2_platform_name} == Linux-x86_64 ]
61+
then
62+
plat_name=manylinux2014_x86_64
63+
elif [ ${exiv2_platform_name} == Linux-aarch64 ]
64+
then
65+
plat_name=manylinux2014_aarch64
66+
elif [ ${exiv2_platform_name} == Darwin-x86_64 ]
67+
then
68+
plat_name=macosx_13_0_x86_64
69+
elif [ ${exiv2_platform_name} == Darwin-arm64 ]
70+
then
71+
plat_name=macosx_14_0_arm64
72+
elif [ ${exiv2_platform_name} == 2022msvc-AMD64 ]
73+
then
74+
plat_name=win_amd64
75+
else
76+
echo "Unknown platform: ${item}"
77+
exit 1
78+
fi
79+
80+
echo " - python setup.py bdist_wheel --python-tag cp${py_version} --plat-name ${plat_name}"
81+
python setup.py bdist_wheel --python-tag cp${py_version} --plat-name ${plat_name}
82+
done
3483
3584
- name: Upload wheels as artifacts
3685
uses: actions/upload-artifact@v4
3786
with:
3887
name: wheels
3988
path: |
40-
dist/
89+
dist/*
4190
if-no-files-found: error
4291
retention-days: 3
4392

44-
- name: Upload to GitHub
93+
- name: Upload wheels to GitHub
4594
uses: softprops/action-gh-release@v2
46-
if: inputs.upload_to_github == true
95+
if: inputs.upload_to_github == 'true'
4796
with:
4897
name: A draft for release
4998
draft: true
5099
body: This release is automatically generated by workflows/release.yml.
51100
files: |
52-
dist/
101+
dist/*
53102
54-
# - name: Upload to PyPI
55-
# if: inputs.upload_to_pypi == true
103+
# - name: Upload wheels to PyPI
104+
# if: inputs.upload_to_pypi == 'true'
56105
# run: |
57-
# python -m pip install twine
58-
# python -m twine upload --verbose --skip-existing dist/*
106+
# python -m twine upload -u __token__ dist/*
107+
# # Maybe the token should not be used, according to https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#configuring-trusted-publishing

.github/workflows/test_package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
workflow_dispatch:
99
inputs:
1010
pyexiv2_version:
11-
default: 2.15.3
11+
default: 2.15.4
1212

1313
jobs:
1414
on_linux:

docs/Tutorial-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def convert_iptc_to_xmp(data: dict, encoding='utf-8') -> dict
113113
def convert_xmp_to_exif(data: dict, encoding='utf-8') -> dict
114114
def convert_xmp_to_iptc(data: dict, encoding='utf-8') -> dict
115115

116-
__version__ = '2.15.3'
116+
__version__ = '2.15.4'
117117
__exiv2_version__ = '0.28.5'
118118
```
119119

docs/Tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def convert_iptc_to_xmp(data: dict, encoding='utf-8') -> dict
113113
def convert_xmp_to_exif(data: dict, encoding='utf-8') -> dict
114114
def convert_xmp_to_iptc(data: dict, encoding='utf-8') -> dict
115115

116-
__version__ = '2.15.3'
116+
__version__ = '2.15.4'
117117
__exiv2_version__ = '0.28.5'
118118
```
119119

pyexiv2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from .core import *
77

88

9-
__version__ = '2.15.3'
9+
__version__ = '2.15.4'
1010
__exiv2_version__ = exiv2api.version()
1111

1212

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setuptools.setup(
1010
name='pyexiv2',
11-
version='2.15.3', # need to set the variable in 'pyexiv2/__init__.py'
11+
version='2.15.4', # need to set the variable in 'pyexiv2/__init__.py'
1212
author='LeoHsiao',
1313
author_email='leohsiao@foxmail.com',
1414
description='Read and write image metadata, including EXIF, IPTC, XMP, ICC Profile.',

0 commit comments

Comments
 (0)