From 11c524686fdd5ad6820d38c2a6bdf898b022bc82 Mon Sep 17 00:00:00 2001 From: Christopher Rabotin Date: Sat, 18 Nov 2023 14:34:51 -0700 Subject: [PATCH] Switch build for Python --- .github/workflows/python.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 6dd68f6..69d88cb 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -28,14 +28,27 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' - name: Build wheels uses: PyO3/maturin-action@v1 with: target: ${{ matrix.target }} args: --release --out dist --find-interpreter -F python - sccache: 'false' - manylinux: false + manylinux: auto + before-script-linux: | + # If we're running on rhel centos, install needed packages. + if command -v yum &> /dev/null; then + yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic + + # If we're running on i686 we need to symlink libatomic + # in order to build openssl with -latomic flag. + if [[ ! -d "/usr/lib64" ]]; then + ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so + fi + else + # If we're running on debian-based system. + apt update -y && apt-get install -y libssl-dev openssl pkg-config + fi - name: Upload wheels uses: actions/upload-artifact@v3 with: @@ -74,7 +87,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' architecture: ${{ matrix.target }} - name: Build wheels uses: PyO3/maturin-action@v1 @@ -105,7 +118,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' - name: Build wheels uses: PyO3/maturin-action@v1 with: