diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 9237701..6e91b62 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -35,9 +35,22 @@ jobs: uses: PyO3/maturin-action@v1 with: target: ${{ matrix.target }} - args: --release --out dist -i 3.11 -F pyo3/abi3-py311 -F duckdb-bundled + args: --release --out dist -i 3.11 -F pyo3/abi3-py311 -F duckdb-bundled -F openssl-vendored sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} manylinux: "2_28" + before-script-linux: | + case "${{ matrix.target }}" in + "aarch64" | "armv7" | "ppc64le") + # NOTE: pypa/manylinux docker images are Debian based + sudo apt-get update + sudo apt-get install -y pkg-config libssl-dev + ;; + "x86_64") + # NOTE: rust-cross/manylinux docker images are CentOS based + yum update -y + yum install -y openssl openssl-devel perl-IPC-Cmd + ;; + esac - name: Upload wheels uses: actions/upload-artifact@v4 with: @@ -64,7 +77,7 @@ jobs: uses: PyO3/maturin-action@v1 with: target: ${{ matrix.platform.target }} - args: --release --out dist -i 3.11 -F pyo3/abi3-py311 -F duckdb-bundled + args: --release --out dist -i 3.11 -F pyo3/abi3-py311 -F duckdb-bundled -F openssl-vendored sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} manylinux: musllinux_1_2 - name: Upload wheels diff --git a/Cargo.lock b/Cargo.lock index f618058..bbfc643 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2616,6 +2616,15 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" +[[package]] +name = "openssl-src" +version = "300.4.2+3.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168ce4e058f975fe43e89d9ccf78ca668601887ae736090aacc23ae353c298e2" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.110" @@ -2624,6 +2633,7 @@ checksum = "0a9f0075ba3c21b09f8e8b2026584b1d18d49388648f2fbbf3c97ea8deced8e2" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] @@ -3567,6 +3577,7 @@ dependencies = [ "futures-util", "geoarrow-schema 0.4.0", "geojson", + "openssl", "parquet", "pyo3", "pyo3-arrow", diff --git a/Cargo.toml b/Cargo.toml index bad2592..77b30dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ crate-type = ["cdylib"] [features] duckdb-bundled = ["stac-duckdb/bundled"] +openssl-vendored = ["dep:openssl"] [dependencies] clap = "4.5.31" @@ -18,6 +19,7 @@ futures-core = "0.3.31" futures-util = "0.3.31" geoarrow-schema = "0.4.0" geojson = "0.24.1" +openssl = { version = "0.10", features = ["vendored"], optional = true } parquet = "56.0.0" pyo3 = { version = "0.26.0", features = ["extension-module"] } pyo3-arrow = "0.12.0" diff --git a/src/lib.rs b/src/lib.rs index 84b8ba6..94dab33 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,6 +13,8 @@ mod walk; mod write; use error::Error; +#[cfg(feature = "openssl-vendored")] +use openssl as _; use pyo3::prelude::*; type Result = std::result::Result;