-
Notifications
You must be signed in to change notification settings - Fork 22
191 lines (158 loc) · 5.73 KB
/
Copy pathpython_packages.yml
File metadata and controls
191 lines (158 loc) · 5.73 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
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_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_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 18 2026"
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}"
MSBUILDDISABLENODEREUSE: "1"
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 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_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: 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: 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 build twine
- name: Build sdist
run: python -m build --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/