From 0f8e2c129f75b2da4e251a1b6725d3ca84624a39 Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Fri, 31 Jan 2025 14:54:34 -0700 Subject: [PATCH 1/2] fix: bundle duckdb for wheels --- .github/workflows/python-cli.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-cli.yml b/.github/workflows/python-cli.yml index 8c052326..e177d257 100644 --- a/.github/workflows/python-cli.yml +++ b/.github/workflows/python-cli.yml @@ -36,7 +36,7 @@ jobs: uses: PyO3/maturin-action@v1 with: target: ${{ matrix.platform.target }} - args: --release --out dist --find-interpreter --manifest-path crates/cli/Cargo.toml + args: --release --out dist --find-interpreter --manifest-path crates/cli/Cargo.toml -F duckdb/bundled sccache: "true" manylinux: auto - name: Upload wheels @@ -67,7 +67,7 @@ jobs: uses: PyO3/maturin-action@v1 with: target: ${{ matrix.platform.target }} - args: --release --out dist --find-interpreter --manifest-path crates/cli/Cargo.toml + args: --release --out dist --find-interpreter --manifest-path crates/cli/Cargo.toml -F duckdb/bundled sccache: "true" manylinux: musllinux_1_2 - name: Upload wheels @@ -95,7 +95,7 @@ jobs: uses: PyO3/maturin-action@v1 with: target: ${{ matrix.platform.target }} - args: --release --out dist --find-interpreter --manifest-path crates/cli/Cargo.toml + args: --release --out dist --find-interpreter --manifest-path crates/cli/Cargo.toml -F duckdb/bundled sccache: "true" - name: Upload wheels uses: actions/upload-artifact@v4 @@ -121,7 +121,7 @@ jobs: uses: PyO3/maturin-action@v1 with: target: ${{ matrix.platform.target }} - args: --release --out dist --find-interpreter --manifest-path crates/cli/Cargo.toml + args: --release --out dist --find-interpreter --manifest-path crates/cli/Cargo.toml -F duckdb/bundled sccache: "true" - name: Upload wheels uses: actions/upload-artifact@v4 From d26b5bb17b1ab3d829b592360d03af0cddacc32a Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Mon, 3 Feb 2025 04:59:30 -0700 Subject: [PATCH 2/2] feat: add duckdb to cli --- crates/cli/Cargo.toml | 1 + crates/cli/src/lib.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index a1a161a2..02aaf787 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -20,6 +20,7 @@ python = ["dep:pyo3", "pgstac"] anyhow.workspace = true axum.workspace = true clap = { workspace = true, features = ["derive"] } +duckdb.workspace = true # we depend on it directly so that we can bundle it for the Python wheels object_store.workspace = true pyo3 = { workspace = true, optional = true } reqwest.workspace = true diff --git a/crates/cli/src/lib.rs b/crates/cli/src/lib.rs index 484190d7..fb00441e 100644 --- a/crates/cli/src/lib.rs +++ b/crates/cli/src/lib.rs @@ -1,5 +1,6 @@ use anyhow::{anyhow, Error, Result}; use clap::{Parser, Subcommand}; +use duckdb as _; use stac::{geoparquet::Compression, Collection, Format, Item, Links, Migrate, Validate}; use stac_api::{GetItems, GetSearch, Search}; use stac_server::Backend;