Skip to content

Commit a45c408

Browse files
committed
ci(windows): create the psycopg2-binary package in Github
1 parent 1fc5889 commit a45c408

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/packages.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ jobs:
196196
matrix:
197197
arch: [win_amd64]
198198
pyver: [cp38, cp39, cp310, cp311, cp312, cp313]
199+
package_name: [psycopg2, psycopg2-binary]
199200

200201
defaults:
201202
run:
@@ -226,9 +227,11 @@ jobs:
226227
core.addPath(path.join(process.env.VCPKG_INSTALLATION_ROOT, 'installed/x64-windows-release/lib'));
227228
core.addPath(path.join(process.env.VCPKG_INSTALLATION_ROOT, 'installed/x64-windows-release/bin'));
228229
229-
# TODO: patch to psycopg2-binary
230-
# - name: Create the binary package source tree
231-
# run: python3 ./tools/build/copy_to_binary.py
230+
- name: Create the binary package source tree
231+
run: >-
232+
sed -i 's/^setup(name="psycopg2"/setup(name="${{matrix.package_name}}"/'
233+
setup.py
234+
if: ${{ matrix.package_name != 'psycopg2' }}
232235

233236
- name: Build wheels
234237
uses: pypa/[email protected]
@@ -252,7 +255,7 @@ jobs:
252255
- name: Upload artifacts
253256
uses: actions/upload-artifact@v4
254257
with:
255-
name: windows-${{matrix.pyver}}-${{matrix.arch}}
258+
name: windows-${{ matrix.package_name }}-${{matrix.pyver}}-${{matrix.arch}}
256259
path: ./wheelhouse/*.whl
257260

258261
# }}}

0 commit comments

Comments
 (0)