From: Daniele Varrazzo Date: Tue, 29 Jun 2021 22:55:38 +0000 (+0100) Subject: Install Postgres in the image to build Windows packages X-Git-Tag: 3.0.dev0~2^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8242a3d8f168ee1ee77a0aa26a37732d103ebd09;p=thirdparty%2Fpsycopg.git Install Postgres in the image to build Windows packages --- diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index 4cfe26035..8e1d841d7 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -121,6 +121,8 @@ jobs: env: CIBW_BUILD: ${{matrix.pyver}}-${{matrix.arch}} CIBW_ARCHS_WINDOWS: AMD64 x86 + CIBW_BEFORE_ALL_WINDOWS: >- + powershell.exe tools\build\wheel_windows_before_all.ps1 CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel" CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >- delvewheel repair -w {dest_dir} {wheel} diff --git a/tools/build/wheel_windows_before_all.ps1 b/tools/build/wheel_windows_before_all.ps1 new file mode 100755 index 000000000..eb9b88705 --- /dev/null +++ b/tools/build/wheel_windows_before_all.ps1 @@ -0,0 +1,29 @@ +#!/bin/bash + +# Configure the environment needed to build wheel packages on Windows. +# This script is designed to be used by cibuildwheel as CIBW_BEFORE_ALL_WINDOWS + +# Set-PSDebug -Trace 1 + +python -c "import os; print(os.environ['PATH'])" + +# choco install postgresql13 --params '/Password:password' + +# From: https://www.enterprisedb.com/download-postgresql-binaries +Invoke-WebRequest ` + -Uri "https://sbp.enterprisedb.com/getfile.jsp?fileid=1257716" ` + -OutFile C:\postgresql-13.3-2-windows-x64-binaries.zip + +Expand-Archive ` + -LiteralPath C:\postgresql-13.3-2-windows-x64-binaries.zip ` + -DestinationPath C:\ + +# python -c "import os; print(os.environ['PATH'])" + +# pg_config + +# dir C:/STRAWB~1/c/bin +# dir C:/STRAWB~1/c/lib + +dir C:\pgsql\bin +C:\pgsql\bin\pg_config