Skip to content

Commit ed0523b

Browse files
authored
fix: install openssl when building wheels (#169)
1 parent 902a4f0 commit ed0523b

File tree

4 files changed

+30
-2
lines changed

4 files changed

+30
-2
lines changed

.github/workflows/pypi.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,22 @@ jobs:
3535
uses: PyO3/maturin-action@v1
3636
with:
3737
target: ${{ matrix.target }}
38-
args: --release --out dist -i 3.11 -F pyo3/abi3-py311 -F duckdb-bundled
38+
args: --release --out dist -i 3.11 -F pyo3/abi3-py311 -F duckdb-bundled -F openssl-vendored
3939
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
4040
manylinux: "2_28"
41+
before-script-linux: |
42+
case "${{ matrix.target }}" in
43+
"aarch64" | "armv7" | "ppc64le")
44+
# NOTE: pypa/manylinux docker images are Debian based
45+
sudo apt-get update
46+
sudo apt-get install -y pkg-config libssl-dev
47+
;;
48+
"x86_64")
49+
# NOTE: rust-cross/manylinux docker images are CentOS based
50+
yum update -y
51+
yum install -y openssl openssl-devel perl-IPC-Cmd
52+
;;
53+
esac
4154
- name: Upload wheels
4255
uses: actions/upload-artifact@v4
4356
with:
@@ -64,7 +77,7 @@ jobs:
6477
uses: PyO3/maturin-action@v1
6578
with:
6679
target: ${{ matrix.platform.target }}
67-
args: --release --out dist -i 3.11 -F pyo3/abi3-py311 -F duckdb-bundled
80+
args: --release --out dist -i 3.11 -F pyo3/abi3-py311 -F duckdb-bundled -F openssl-vendored
6881
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
6982
manylinux: musllinux_1_2
7083
- name: Upload wheels

Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ crate-type = ["cdylib"]
1010

1111
[features]
1212
duckdb-bundled = ["stac-duckdb/bundled"]
13+
openssl-vendored = ["dep:openssl"]
1314

1415
[dependencies]
1516
clap = "4.5.31"
@@ -18,6 +19,7 @@ futures-core = "0.3.31"
1819
futures-util = "0.3.31"
1920
geoarrow-schema = "0.4.0"
2021
geojson = "0.24.1"
22+
openssl = { version = "0.10", features = ["vendored"], optional = true }
2123
parquet = "56.0.0"
2224
pyo3 = { version = "0.26.0", features = ["extension-module"] }
2325
pyo3-arrow = "0.12.0"

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ mod walk;
1313
mod write;
1414

1515
use error::Error;
16+
#[cfg(feature = "openssl-vendored")]
17+
use openssl as _;
1618
use pyo3::prelude::*;
1719

1820
type Result<T> = std::result::Result<T, Error>;

0 commit comments

Comments
 (0)