Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to manylinux2014 for aarch64, ppc64le builds. #1545

Merged
merged 2 commits into from
Mar 27, 2023

Conversation

AmirBitaraf
Copy link
Contributor

@AmirBitaraf AmirBitaraf commented Feb 8, 2023

This solves #1396 on aarch64 by moving to manylinux2014 and building against a newer version of libpq.
It continues the work on #1459 but uses manylinux2014 and utilizes build_libpq.sh from psycopg3.

Side Note: As ubuntu-latest is upgraded in Actions, and tox4 is out with breaking changes, ubuntu and tox versions are pinned in the workflows. Ubuntu 22.04 dropped Python 3.6 support.

@AmirBitaraf AmirBitaraf marked this pull request as ready for review February 8, 2023 16:08
@AmirBitaraf
Copy link
Contributor Author

@dvarrazzo I'd appreciate it if you can take a look 🙂

@dvarrazzo
Copy link
Member

Hello!

Thank you very much. I actually thought I had already done this, but apparently I've completely lost the ball.

My plan was to backport and adapt the script used in psycopg 3. I don't know if that's what you did? If you didn't, could you please check in that script if there is anything missing here?

Thank you very much, very appreciated!

@AmirBitaraf
Copy link
Contributor Author

@dvarrazzo Thanks so much!
Yes that's exactly what I did as you mentioned here previously.

@dvarrazzo
Copy link
Member

Have you got a run of the packages workflow somewhere?

@AmirBitaraf
Copy link
Contributor Author

Yes, I basically used a docker-compose.yml file on a M1 macOS to simulate the build flow.

version: '2.8'
services:
  compiler:
    build:
      context: .
    environment:
      - PLAT=manylinux2014_aarch64
      - PACKAGE_NAME=psycopg2-binary
      - PYVERS=cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311
      - PSYCOPG2_TESTDB=postgres
      - PSYCOPG2_TESTDB_HOST=postgresql
      - PSYCOPG2_TESTDB_USER=postgres
      - PSYCOPG2_TESTDB_PASSWORD=password
      - PSYCOPG2_TEST_FAST=1
    command: /src/scripts/build/build_manylinux2014.sh

  postgresql:
    image: postgres:13
    environment:
      POSTGRES_PASSWORD: password

Using:

FROM quay.io/pypa/manylinux2014_aarch64
WORKDIR /src
COPY . /src/

@dvarrazzo
Copy link
Member

Are you able to run the workflow as a manual step in github actions?

image

Thank you!

@AmirBitaraf
Copy link
Contributor Author

@dvarrazzo Here's the workflow result.
I also tested the library with WANT_LIBPQ=150000 and PSYCOPG2_TEST_FAST=0 and both are fine.

One important thing is that I made a slight change, different from what we have in psycopg3. There, you're managing the LD_LIBRARY_PATH using the workflow, but in the current setup I had to do that in the build_libpq.sh. Because openssl's make install_sw moves the final shared objects to different paths in different architectures (lib64 in x86_64 and lib in other architectures). If the current setup is fine, we're good to go. 🙂

@AmirBitaraf
Copy link
Contributor Author

@dvarrazzo Any chance we can move forward on this? 🙂

@dvarrazzo
Copy link
Member

@AmirBitaraf I will try this week

@radekwlsk
Copy link

Would be really helpful to get it released as all workarounds existing cause other complications in my project. Is there any way to help here?

@dvarrazzo
Copy link
Member

I am reviewing the issue. Sorry for the delay but this week I was off.

@dvarrazzo
Copy link
Member

Trying to merge, with no success so far...

image

@ddelange
Copy link

@dvarrazzo dvarrazzo merged commit daeec37 into psycopg:master Mar 27, 2023
@dvarrazzo
Copy link
Member

I have removed the two commits cancelling each other and squash the little details such as the missing EOF char.

Unfortunately macOS build is currently broken. I would like to have it fixed in order to release the new manylinux2014 charts. Will try to do it this week (help is welcome if you can). See #1558

@dvarrazzo
Copy link
Member

FYI, psycopg 2.9.6 released on PyPI right now.

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.

4 participants