Skip to content

Conversation

@mliezun
Copy link
Contributor

@mliezun mliezun commented Oct 28, 2025

Hi!

Here's a patch that builds riscv64 binaries in Github actions.

The binary distribution facilitates the installation of psycopg2 as it avoids having to compile it each time that it gets installed.

Thank you for your review!

@dvarrazzo
Copy link
Member

Hello,

there is a race condition in the creation of the libpq build: it is attempted to build once per Python version but it is independent from it; as a consequence it never gets cached and your test will always take 2 hours to run. The issue was solved in psycopg 3 (psycopg/psycopg@e11da8ae). Do you want to try and backport this solution?

@dvarrazzo
Copy link
Member

Do you want to propose a similar MR for psycopg 3 or should I do it myself? The build script is pretty much the same (but with the care to run it only once for every Python release).

@mliezun
Copy link
Contributor Author

mliezun commented Oct 28, 2025

Do you want to propose a similar MR for psycopg 3 or should I do it myself? The build script is pretty much the same (but with the care to run it only once for every Python release).

Thanks for your review @dvarrazzo.

I'll create a new PR for psycopg 3 😉

Copy link
Member

@dvarrazzo dvarrazzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for sorting over this workflow! There are some details to adapt to pg2 :)

@mliezun
Copy link
Contributor Author

mliezun commented Oct 28, 2025

Thank you for sorting over this workflow! There are some details to adapt to pg2 :)

Of course! Sorry for missing those details 😅

@dvarrazzo
Copy link
Member

Hello,

the PR seems in good shape, but I don't see a package workflow completed. Please let me know if you manage to make one.

Also please squash the branch in a single commit or in a few meaningful one: the way you did it the PG3 PR is perfect, including the commit messages 💜

Let me know when we are ready to merge. I will rebuild the packages on the official side and can release them immediately (for psycopg 3 they will be released with 3.3.0, which should happen soon).

This commit introduces a new GitHub Actions workflow for building and caching the libpq package, ensuring that the libpq artifacts are available for subsequent builds.
Additionally, it updates the build scripts to release riscv64 binaries for linux.
@mliezun
Copy link
Contributor Author

mliezun commented Oct 29, 2025

Hello,

the PR seems in good shape, but I don't see a package workflow completed. Please let me know if you manage to make one.

Also please squash the branch in a single commit or in a few meaningful one: the way you did it the PG3 PR is perfect, including the commit messages 💜

Let me know when we are ready to merge. I will rebuild the packages on the official side and can release them immediately (for psycopg 3 they will be released with 3.3.0, which should happen soon).

Hi Daniele!

I squashed the PR into a single commit ✅

Also, the build packages workflow has completed successfully, see here: https://github.com/mliezun/psycopg2/actions/runs/18902919058

I think this is ready to merge 🚀

@dvarrazzo
Copy link
Member

Looks good! Let's merge.

@dvarrazzo dvarrazzo merged commit 0f82879 into psycopg:master Oct 29, 2025
1 check failed
@dvarrazzo
Copy link
Member

riscv64 packages released 👍

@mliezun
Copy link
Contributor Author

mliezun commented Oct 30, 2025

Thanks @dvarrazzo!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants