ci: use vcpkg to install libpq on windows#966
ci: use vcpkg to install libpq on windows#966dvarrazzo merged 3 commits intopsycopg:masterfrom trim21:try-vcpkg
Conversation
|
Trying to have a chat with vkpkg to figure out if they can add libpq 17... |
|
microsoft/vcpkg#41747 would allow to use libpq 17 |
|
This shows something strange: it seems that we do find the vcpkg at build time, but when testing we found an outdated version. I have push a change to upgrade the dependency check. Maybe we should just delete the offending stale libpq.dll from the runner. I would iterate on every entry in PATH and delete |
dvarrazzo
left a comment
There was a problem hiding this comment.
Thank you very much for this initiative: it seems a welcome change.
I think it may be possible to use a static libpq here? would that be a option? |
If it works it would not be a problem to distribute a static build. |
This comment was marked as outdated.
This comment was marked as outdated.
Just find out that we do not need to clear libpq.dll from path (even there is also a very old version 11 in path from php, but I just rm whole php from runner). The reason it use wrong dll is, there is a extra repair wheel step with extra PATH I forget to remove, so it bundle wrong dll into wheels. psycopg/.github/workflows/tests.yml Lines 328 to 333 in c7b8ed5 Remove this step will make it work as expected. |
|
done There are some extra workflow file changes for debugging, I'll revert them once this PR is ready to be merged. |
tools/build/pg_config_vcpkg_stub/pg_config_vcpkg_stub/__init__.py
Outdated
Show resolved
Hide resolved
|
Thank you very much for this works: looks good! I have rebased the branch and squashed your commits and re-enabled all the CI jobs. Running a final test on the workflows our side, and then this is good to go. |
|
some unexpected master branch change in diff view? |
|
You are right, my bad: my local master was ahead one step WRT upstream, because it's sitting on an unrelated MR. Rebasing again... |
|
qemu is so slow… |
Why, what are you trying to do? 😄 |
nothing, just hoping GitHub get free arm linux runner someday |
|
Merged! Thank you very much for this work! I actually need to do the same for psycopg2: the build system for Windows runs on appveyor and the platform is not very quick to release new runners. As a consequence we haven't provided yet Python 3.13 wheels for Windows (psycopg/psycopg2#1736) :\ I think it will easy to backport this build procedure to psycopg 2 too. Would you be willing to provide a MR for it? If not it's no problem: thanks to your help it shouldn't be difficult for me to do it. Thank you again! |
|
not really, sorry, I do not use psycopg2 |
|
Sorry to reply to a already merged issue, I recently just find that conda ecosystem (conda-force) provide libpq(with a working pg_config.exe, so we can also get ride of pg_config_vcpkg_stub) and openssl for windows platform. And doesn't like vcpkg, you can lock version of libpq and openssl. So maybe it's possible to resolve this comment if we install libpq conda but not vcpkg. psycopg/.github/workflows/packages-bin.yml Lines 26 to 30 in c05c117 (also using conda doesn't mean you have to use a python from conda, it's possible to use c-library from conda without using a python from it.) |
ref: #916
It build wheel as expected:
https://github.com/trim21/psycopg/actions/runs/12343652281