gettextpo 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,23 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: cargo
4
+ directory: "/"
5
+ schedule:
6
+ interval: weekly
7
+ groups:
8
+ cargo-minor-patch:
9
+ update-types: [minor, patch]
10
+ - package-ecosystem: pip
11
+ directory: "/"
12
+ schedule:
13
+ interval: weekly
14
+ groups:
15
+ pip-minor-patch:
16
+ update-types: [minor, patch]
17
+ - package-ecosystem: github-actions
18
+ directory: "/"
19
+ schedule:
20
+ interval: weekly
21
+ groups:
22
+ github-actions-minor-patch:
23
+ update-types: [minor, patch]
@@ -0,0 +1,95 @@
1
+ # This file is autogenerated by maturin v1.4.0
2
+ # To update, run
3
+ #
4
+ # maturin generate-ci github
5
+ #
6
+ name: CI
7
+
8
+ on:
9
+ push:
10
+ branches:
11
+ - main
12
+ - master
13
+ pull_request:
14
+ workflow_dispatch:
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ linux:
21
+ runs-on: ubuntu-latest
22
+ strategy:
23
+ matrix:
24
+ target: [x86_64]
25
+ python: ['3.12', '3.15']
26
+ steps:
27
+ - uses: actions/checkout@v7.0.1
28
+ - uses: actions/setup-python@v7.1.0
29
+ with:
30
+ python-version: ${{ matrix.python }}
31
+ - name: Build wheels
32
+ uses: PyO3/maturin-action@v1.51.0
33
+ with:
34
+ target: ${{ matrix.target }}
35
+ args: --release --out dist --find-interpreter
36
+ sccache: 'true'
37
+ manylinux: 2_28
38
+ before-script-linux: |
39
+ if command -v dnf; then
40
+ dnf install -y clang gettext-devel
41
+ elif command -v yum; then
42
+ yum install -y clang gettext-devel
43
+ elif command -v apk; then
44
+ apk add clang-dev gettext-dev
45
+ elif command -v apt-get; then
46
+ apt-get update && apt-get install -y libclang-dev libgettextpo-dev
47
+ fi
48
+ - name: Upload wheels
49
+ uses: actions/upload-artifact@v7.0.2
50
+ with:
51
+ name: wheels-linux-${{ matrix.target }}-py${{ matrix.python }}
52
+ path: dist
53
+
54
+ macos:
55
+ runs-on: macos-latest
56
+ strategy:
57
+ matrix:
58
+ target: [x86_64, aarch64]
59
+ python: ['3.12', '3.15']
60
+ steps:
61
+ - uses: actions/checkout@v7.0.1
62
+ - uses: actions/setup-python@v7.1.0
63
+ with:
64
+ python-version: ${{ matrix.python }}
65
+ - name: Install gettext
66
+ run: brew install gettext
67
+ - name: Build wheels
68
+ uses: PyO3/maturin-action@v1.51.0
69
+ env:
70
+ BINDGEN_EXTRA_CLANG_ARGS: -I/opt/homebrew/opt/gettext/include -I/usr/local/opt/gettext/include
71
+ RUSTFLAGS: -L/opt/homebrew/opt/gettext/lib -L/usr/local/opt/gettext/lib
72
+ with:
73
+ target: ${{ matrix.target }}
74
+ args: --release --out dist --find-interpreter
75
+ sccache: 'true'
76
+ - name: Upload wheels
77
+ uses: actions/upload-artifact@v7.0.2
78
+ with:
79
+ name: wheels-macos-${{ matrix.target }}-py${{ matrix.python }}
80
+ path: dist
81
+
82
+ sdist:
83
+ runs-on: ubuntu-latest
84
+ steps:
85
+ - uses: actions/checkout@v7.0.1
86
+ - name: Build sdist
87
+ uses: PyO3/maturin-action@v1.51.0
88
+ with:
89
+ command: sdist
90
+ args: --out dist
91
+ - name: Upload sdist
92
+ uses: actions/upload-artifact@v7.0.2
93
+ with:
94
+ name: wheels-sdist
95
+ path: dist
@@ -0,0 +1,55 @@
1
+ # This file is machine-generated by `gh actions-lock`.
2
+ # Do not edit by hand; run `gh actions-lock` to update.
3
+ # Docs: https://gh.io/actions-lockfile
4
+ version: 'v0.0.3'
5
+ workflows:
6
+ '.github/workflows/CI.yml':
7
+ - 'actions/checkout@v7.0.1'
8
+ - 'actions/setup-python@v7.1.0'
9
+ - 'actions/upload-artifact@v7.0.2'
10
+ - 'pyo3/maturin-action@v1.51.0'
11
+ '.github/workflows/release.yml':
12
+ - 'actions/checkout@v7.0.1'
13
+ - 'actions/download-artifact@v8.0.2'
14
+ - 'actions/setup-python@v7.1.0'
15
+ - 'actions/upload-artifact@v7.0.2'
16
+ - 'pyo3/maturin-action@v1.51.0'
17
+ - 'pypa/gh-action-pypi-publish@v1.14.3'
18
+ dependencies:
19
+ 'actions/checkout@v7.0.1':
20
+ ref: 'v7.0.1'
21
+ commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
22
+ owner_id: 44036562
23
+ repo_id: 197814629
24
+ 'actions/download-artifact@v8.0.2':
25
+ ref: 'v8.0.2'
26
+ commit: 'sha1-9000827ccba6bdab643e8b6fd33ac0654aef8333'
27
+ owner_id: 44036562
28
+ repo_id: 192626254
29
+ 'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405':
30
+ ref: 'v6.2.0'
31
+ commit: 'sha1-a309ff8b426b58ec0e2a45f0f869d46889d02405'
32
+ owner_id: 44036562
33
+ repo_id: 192625525
34
+ 'actions/setup-python@v7.1.0':
35
+ ref: 'v7.1.0'
36
+ commit: 'sha1-6d4fd22b20465ccc0f7354476588e8df7c9ca0e0'
37
+ owner_id: 44036562
38
+ repo_id: 192625525
39
+ 'actions/upload-artifact@v7.0.2':
40
+ ref: 'v7.0.2'
41
+ commit: 'sha1-cf430e030ddbb5b0abf93d22962f4752f3646cd9'
42
+ owner_id: 44036562
43
+ repo_id: 192625955
44
+ 'pyo3/maturin-action@v1.51.0':
45
+ ref: 'v1.51.0'
46
+ commit: 'sha1-e83996d129638aa358a18fbd1dfb82f0b0fb5d3b'
47
+ owner_id: 28156855
48
+ repo_id: 363801746
49
+ 'pypa/gh-action-pypi-publish@v1.14.3':
50
+ ref: 'v1.14.3'
51
+ commit: 'sha1-7245906fb61fa33a13554f9d5fb856fe61758086'
52
+ owner_id: 647025
53
+ repo_id: 178055147
54
+ uses:
55
+ - 'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405'
@@ -0,0 +1,253 @@
1
+ name: Release
2
+ on:
3
+ workflow_dispatch:
4
+ inputs:
5
+ version_bump:
6
+ description: Version bump type
7
+ required: true
8
+ type: choice
9
+ options:
10
+ - patch
11
+ - minor
12
+ - major
13
+ permissions:
14
+ contents: read
15
+ concurrency:
16
+ group: release
17
+ env:
18
+ CRATE: gettextpo_
19
+ PACKAGE: gettextpo
20
+ VERSION_FILES: Cargo.toml Cargo.lock pyproject.toml
21
+ DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
22
+ defaults:
23
+ run:
24
+ shell: bash
25
+ jobs:
26
+ check:
27
+ name: Bump version
28
+ runs-on: ubuntu-latest
29
+ timeout-minutes: 45
30
+ permissions:
31
+ contents: read
32
+ outputs:
33
+ version: ${{ steps.version.outputs.version }}
34
+ steps:
35
+ - name: Require the default branch
36
+ run: |
37
+ if [[ "$GITHUB_REF" != "refs/heads/$DEFAULT_BRANCH" ]]; then
38
+ echo "::error::Dispatch the release workflow from $DEFAULT_BRANCH."
39
+ exit 1
40
+ fi
41
+ - uses: actions/checkout@v7.0.1
42
+ with:
43
+ persist-credentials: false
44
+ - name: Choose version
45
+ id: version
46
+ env:
47
+ BUMP: ${{ inputs.version_bump }}
48
+ GH_TOKEN: ${{ github.token }}
49
+ run: |
50
+ current=$(cargo metadata --locked --no-deps --format-version 1 | jq -er '.packages[] | select(.name == env.CRATE) | .version')
51
+ IFS=. read -r major minor patch <<< "$current"
52
+ case "$BUMP" in
53
+ major) version="$((major + 1)).0.0" ;;
54
+ minor) version="$major.$((minor + 1)).0" ;;
55
+ patch) version="$major.$minor.$((patch + 1))" ;;
56
+ esac
57
+ existing=$(gh api "repos/$GITHUB_REPOSITORY/git/matching-refs/tags/v$version" --jq "[.[] | select(.ref == \"refs/tags/v$version\")] | length")
58
+ if [[ "$existing" != 0 ]]; then
59
+ echo "::error::Tag v$version already exists."
60
+ exit 1
61
+ fi
62
+ echo "version=$version" >> "$GITHUB_OUTPUT"
63
+ - name: Commit version bump
64
+ env:
65
+ VERSION: ${{ steps.version.outputs.version }}
66
+ run: |
67
+ sed -i "0,/^version = \".*\"/s//version = \"$VERSION\"/" Cargo.toml
68
+ sed -i "0,/^version = \".*\"/s//version = \"$VERSION\"/" pyproject.toml
69
+ cargo update --workspace
70
+ git config user.name "github-actions[bot]"
71
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
72
+ read -ra files <<< "$VERSION_FILES"
73
+ git commit -m "Bump version to $VERSION" -- "${files[@]}"
74
+ - name: Build sdist
75
+ uses: PyO3/maturin-action@v1.51.0
76
+ with:
77
+ command: sdist
78
+ args: --out dist
79
+ - name: Verify sdist
80
+ env:
81
+ VERSION: ${{ steps.version.outputs.version }}
82
+ run: ls "dist/$PACKAGE-$VERSION.tar.gz"
83
+ - name: Bundle the version commit
84
+ run: git bundle create "$RUNNER_TEMP/release.bundle" "$GITHUB_SHA..HEAD"
85
+ - uses: actions/upload-artifact@v7.0.2
86
+ with:
87
+ name: release-bundle
88
+ path: ${{ runner.temp }}/release.bundle
89
+ retention-days: 1
90
+
91
+ tag:
92
+ name: Push commit and tag
93
+ needs: [check]
94
+ runs-on: ubuntu-latest
95
+ timeout-minutes: 10
96
+ permissions:
97
+ contents: write
98
+ steps:
99
+ - uses: actions/checkout@v7.0.1
100
+ - uses: actions/download-artifact@v8.0.2
101
+ with:
102
+ name: release-bundle
103
+ path: ${{ runner.temp }}
104
+ - name: Push commit and tag
105
+ env:
106
+ VERSION: ${{ needs.check.outputs.version }}
107
+ run: |
108
+ git fetch "$RUNNER_TEMP/release.bundle" HEAD
109
+ commit=$(git rev-parse FETCH_HEAD)
110
+ if [[ "$(git rev-parse "$commit^")" != "$GITHUB_SHA" ]]; then
111
+ echo "::error::The version commit is not a child of $GITHUB_SHA."
112
+ exit 1
113
+ fi
114
+ read -ra allowed <<< "$VERSION_FILES"
115
+ while read -r file; do
116
+ if [[ " ${allowed[*]} " != *" $file "* ]]; then
117
+ echo "::error::The version commit changes $file."
118
+ exit 1
119
+ fi
120
+ done < <(git diff --name-only "$GITHUB_SHA" "$commit")
121
+ git config user.name "github-actions[bot]"
122
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
123
+ git tag -a "v$VERSION" -m "$PACKAGE v$VERSION" "$commit"
124
+ git push --atomic origin "$commit:refs/heads/$DEFAULT_BRANCH" "refs/tags/v$VERSION"
125
+
126
+ linux:
127
+ needs: [check, tag]
128
+ runs-on: ubuntu-latest
129
+ timeout-minutes: 45
130
+ permissions:
131
+ contents: read
132
+ strategy:
133
+ matrix:
134
+ target: [x86_64]
135
+ steps:
136
+ - uses: actions/checkout@v7.0.1
137
+ with:
138
+ ref: refs/tags/v${{ needs.check.outputs.version }}
139
+ persist-credentials: false
140
+ - uses: actions/setup-python@v7.1.0
141
+ with:
142
+ python-version: |
143
+ 3.12
144
+ 3.15
145
+ - name: Build wheels
146
+ uses: PyO3/maturin-action@v1.51.0
147
+ with:
148
+ target: ${{ matrix.target }}
149
+ args: --release --out dist --find-interpreter
150
+ manylinux: 2_28
151
+ before-script-linux: |
152
+ if command -v dnf; then
153
+ dnf install -y clang gettext-devel
154
+ elif command -v yum; then
155
+ yum install -y clang gettext-devel
156
+ elif command -v apk; then
157
+ apk add clang-dev gettext-dev
158
+ elif command -v apt-get; then
159
+ apt-get update && apt-get install -y libclang-dev libgettextpo-dev
160
+ fi
161
+ - uses: actions/upload-artifact@v7.0.2
162
+ with:
163
+ name: wheels-linux-${{ matrix.target }}
164
+ path: dist
165
+
166
+ macos:
167
+ needs: [check, tag]
168
+ runs-on: macos-latest
169
+ timeout-minutes: 45
170
+ permissions:
171
+ contents: read
172
+ strategy:
173
+ matrix:
174
+ target: [x86_64, aarch64]
175
+ steps:
176
+ - uses: actions/checkout@v7.0.1
177
+ with:
178
+ ref: refs/tags/v${{ needs.check.outputs.version }}
179
+ persist-credentials: false
180
+ - uses: actions/setup-python@v7.1.0
181
+ with:
182
+ python-version: |
183
+ 3.12
184
+ 3.15
185
+ - name: Install gettext
186
+ run: brew install gettext
187
+ - name: Build wheels
188
+ uses: PyO3/maturin-action@v1.51.0
189
+ env:
190
+ BINDGEN_EXTRA_CLANG_ARGS: -I/opt/homebrew/opt/gettext/include -I/usr/local/opt/gettext/include
191
+ RUSTFLAGS: -L/opt/homebrew/opt/gettext/lib -L/usr/local/opt/gettext/lib
192
+ with:
193
+ target: ${{ matrix.target }}
194
+ args: --release --out dist --find-interpreter
195
+ - uses: actions/upload-artifact@v7.0.2
196
+ with:
197
+ name: wheels-macos-${{ matrix.target }}
198
+ path: dist
199
+
200
+ sdist:
201
+ needs: [check, tag]
202
+ runs-on: ubuntu-latest
203
+ timeout-minutes: 15
204
+ permissions:
205
+ contents: read
206
+ steps:
207
+ - uses: actions/checkout@v7.0.1
208
+ with:
209
+ ref: refs/tags/v${{ needs.check.outputs.version }}
210
+ persist-credentials: false
211
+ - name: Build sdist
212
+ uses: PyO3/maturin-action@v1.51.0
213
+ with:
214
+ command: sdist
215
+ args: --out dist
216
+ - uses: actions/upload-artifact@v7.0.2
217
+ with:
218
+ name: wheels-sdist
219
+ path: dist
220
+
221
+ publish:
222
+ name: Publish to PyPI
223
+ needs: [check, linux, macos, sdist]
224
+ runs-on: ubuntu-latest
225
+ timeout-minutes: 30
226
+ environment:
227
+ name: pypi
228
+ url: https://pypi.org/project/${{ env.PACKAGE }}/
229
+ permissions:
230
+ contents: read
231
+ id-token: write
232
+ steps:
233
+ - uses: actions/download-artifact@v8.0.2
234
+ with:
235
+ pattern: wheels-*
236
+ path: dist
237
+ merge-multiple: true
238
+ - uses: pypa/gh-action-pypi-publish@v1.14.3
239
+ with:
240
+ skip-existing: true
241
+
242
+ github-release:
243
+ name: Create GitHub Release
244
+ needs: [check, publish]
245
+ runs-on: ubuntu-latest
246
+ timeout-minutes: 10
247
+ permissions:
248
+ contents: write
249
+ steps:
250
+ - env:
251
+ GH_TOKEN: ${{ github.token }}
252
+ VERSION: ${{ needs.check.outputs.version }}
253
+ run: gh release create "v$VERSION" --repo "$GITHUB_REPOSITORY" --verify-tag --title "$PACKAGE v$VERSION" --generate-notes
@@ -0,0 +1,7 @@
1
+
2
+ .venv
3
+ __pycache__
4
+ dist
5
+ .pdm-python
6
+ target
7
+ *.so