-
Notifications
You must be signed in to change notification settings - Fork 22
235 lines (194 loc) · 7.25 KB
/
python_packages.yml
File metadata and controls
235 lines (194 loc) · 7.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
name: Build and upload to PyPI
on: [push]
jobs:
build_linux_wheels_manylinux_2_28:
name: Build wheels for manylinux_2_28
runs-on: ubuntu-latest
env:
# pp* skips PyPy
CIBW_SKIP: pp* *musllinux*
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_ARCHS: x86_64
CIBW_BEFORE_ALL_LINUX: dnf makecache && dnf install --assumeyes sqlite-devel
CIBW_BEFORE_BUILD: pip install setuptools scikit-build wheel cmake
CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.9'
- name: Build wheels
uses: pypa/cibuildwheel@v3.3.1
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: dist-manylinux_2_28
build_linux_wheels_musllinux_x86_64:
name: Build wheels for musllinux_x86_64 (alpine)
runs-on: ubuntu-latest
env:
CIBW_BUILD: "*musllinux*"
CIBW_BEFORE_ALL_LINUX: apk add sqlite-dev
CIBW_BEFORE_BUILD: pip install setuptools scikit-build wheel cmake
CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.9'
- name: Build wheels
uses: pypa/cibuildwheel@v3.3.1
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: dist-musllinux_x86_64
build_windows_wheels:
name: Build wheels on Windows
runs-on: windows-2025
env:
CMAKE_GENERATOR: "Visual Studio 17 2022"
SQLite3_ROOT: "C:/vcpkg/installed/x64-windows"
CIBW_SKIP: "*-win32"
CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path C:/vcpkg/installed/x64-windows/bin --no-mangle-all -v -w {dest_dir} {wheel}"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.9'
- name: Install Deps
run: |
C:/vcpkg/vcpkg install sqlite3[rtree,fts3,json1] --triplet x64-windows
C:/vcpkg/vcpkg integrate install
pip install setuptools scikit-build wheel cmake delvewheel
dir "C:/vcpkg/installed/x64-windows/bin"
- name: Build wheels
uses: pypa/cibuildwheel@v3.3.1
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: dist-windows
build_windows_32_wheels:
name: Build 32bit wheels on Windows
runs-on: windows-2025
env:
CMAKE_GENERATOR: "Visual Studio 17 2022"
CMAKE_GENERATOR_PLATFORM: "Win32"
SQLite3_ROOT: "C:/vcpkg/installed/x86-windows"
CIBW_SKIP: pp* *-win_amd64
CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path C:/vcpkg/installed/x86-windows/bin --no-mangle-all -v -w {dest_dir} {wheel}"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.9'
architecture: x86
- name: Install Deps
run: |
C:/vcpkg/vcpkg install sqlite3[rtree,fts3,json1] --triplet x86-windows
C:/vcpkg/vcpkg integrate install
pip install setuptools scikit-build wheel cmake delvewheel
dir "C:/vcpkg/installed/x86-windows/bin"
- name: Build wheels
uses: pypa/cibuildwheel@v3.3.1
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: dist-windows_32
build_macos_arm64_wheels:
name: Build wheels on macos-15 (arm64)
runs-on: macos-15
env:
SQLite3_ROOT: ${{ github.workspace }}/libs
MACOSX_DEPLOYMENT_TARGET: '14.0'
CIBW_SKIP: ""
CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()"
CIBW_BEFORE_ALL: >
wget https://www.sqlite.org/2024/sqlite-autoconf-3460100.tar.gz &&
tar -xzvf sqlite-autoconf-3460100.tar.gz &&
cd sqlite-autoconf-3460100 &&
CC=clang CFLAGS="-arch arm64 -O3 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_COLUMN_METADATA" ./configure --enable-dynamic-extensions --prefix=${{ github.workspace }}/libs/ &&
make install
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.9'
- name: Install Deps
run: |
pip install setuptools scikit-build wheel cmake
- name: Build wheels
uses: pypa/cibuildwheel@v3.3.1
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: dist-macos_arm64
build_macos_wheels:
name: Build wheels on macos-15 (Intel)
runs-on: macos-15-intel
env:
SQLite3_ROOT: ${{ github.workspace }}/libs
MACOSX_DEPLOYMENT_TARGET: '10.9'
CIBW_SKIP: ""
CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()"
CIBW_BEFORE_ALL: >
wget https://www.sqlite.org/2024/sqlite-autoconf-3460100.tar.gz &&
tar -xzvf sqlite-autoconf-3460100.tar.gz &&
cd sqlite-autoconf-3460100 &&
CC=clang CFLAGS="-arch x86_64 -O3 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_COLUMN_METADATA" ./configure --enable-dynamic-extensions --prefix=${{ github.workspace }}/libs/ &&
make install
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.9'
- name: Install Deps
run: |
pip install setuptools scikit-build wheel cmake
- name: Build wheels
uses: pypa/cibuildwheel@v3.3.1
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: dist-macos
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.9'
- name: Install deps
run: |
pip install --upgrade pip
pip install setuptools twine scikit-build wheel cmake
- name: Build sdist
run: python setup.py sdist
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz
name: dist-source
upload_pypi:
needs: [build_windows_wheels, build_linux_wheels_manylinux_2_28, build_linux_wheels_musllinux_x86_64, build_macos_wheels, build_macos_arm64_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v4
with:
pattern: dist-*
merge-multiple: true
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
# To test: repository_url: https://test.pypi.org/legacy/