From 89f5dff8e53f7fd3e48c2a1b54e35d5592c23954 Mon Sep 17 00:00:00 2001 From: Facundo Tuesca Date: Wed, 16 Oct 2024 14:01:04 +0200 Subject: [PATCH] Try non-vendored OpenSSL --- .github/workflows/CI.yml | 25 +++++++++++++++++-------- rust/Cargo.toml | 2 +- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index da8b0c5..6ab2b5b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -44,14 +44,10 @@ jobs: if command -v yum 2>&1 >/dev/null then yum update - yum install -y perl-core cpanminus devtoolset-10-libatomic-devel - # Workaround for OpenSSL not building on Centos 7 (manylinux2014) - # Remove once `openssl-src` builds OpenSSL > 3.3.2 by default - # Ref: https://github.com/openssl/openssl/pull/25367#issuecomment-2327177830 - cpanm --verbose --notest install Sub::Util - # else - # apt update - # apt install -y perl-core + yum install -y openssl-devel + else + apt update + apt install -y libssl-dev fi - name: Upload wheels uses: actions/upload-artifact@v4 @@ -92,8 +88,10 @@ jobs: matrix: platform: - runner: windows-latest + arch: 64 target: x64 - runner: windows-latest + arch: 32 target: x86 steps: - uses: actions/checkout@v4 @@ -101,8 +99,19 @@ jobs: with: python-version: 3.x architecture: ${{ matrix.platform.target }} + - name: Install OpenSSL + env: + OPENSSL_INSTALLER: "Win${{ matrix.platform.arch }}OpenSSL-3_3_2.exe" + OPENSSL_PATH: "C:\\OpenSSL-Win${{ matrix.platform.arch }}" + run: | + curl.exe -o "c:\\${env:OPENSSL_INSTALLER}" -fsSL "https://slproweb.com/download/${env:OPENSSL_INSTALLER}" + Start-Process -FilePath "c:\\${env:OPENSSL_INSTALLER}" -ArgumentList "/silent /verysilent /DIR=${env:OPENSSL_PATH}" -NoNewWindow -Wait + echo "Installed OpenSSL version:" + Start-Process -FilePath "${env:OPENSSL_PATH}\\bin\\openssl.exe" -ArgumentList "version" -Wait -NoNewWindow - name: Build wheels uses: PyO3/maturin-action@v1 + env: + OPENSSL_DIR: "C:\\OpenSSL-Win${{ matrix.platform.arch }}" with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 7063662..ff4e03d 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -21,7 +21,7 @@ hex = "0.4" sha2 = "0.10.8" rand = "0.8.5" cryptography-x509 = { git = "https://github.com/pyca/cryptography.git"} -openssl = { version = "0.10.66", features = ["vendored"] } +openssl = { version = "0.10.66" } [features] extension-module = ["pyo3/extension-module"]