This is an automated email from the ASF dual-hosted git repository.

yuxia pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluss-rust.git

commit cf3c35906f35212bedc62b10b585a2f07547634d
Author: yuxia Luo <[email protected]>
AuthorDate: Tue Mar 3 20:02:30 2026 +0800

    ci: fix ci build wheel issue for python (#419)
---
 .github/workflows/release_python.yml | 20 +++++++++++++++++++-
 bindings/python/Cargo.toml           |  2 +-
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/release_python.yml 
b/.github/workflows/release_python.yml
index d7bd04c..323838d 100644
--- a/.github/workflows/release_python.yml
+++ b/.github/workflows/release_python.yml
@@ -94,9 +94,10 @@ jobs:
 
       - name: Install protoc (Windows)
         if: runner.os == 'Windows'
-        run: choco install protobuf -y
+        run: choco install protoc -y
         shell: pwsh
 
+      # Install protoc in manylinux container (x86_64/aarch64); script shared 
via YAML anchor
       - uses: PyO3/maturin-action@v1
         with:
           working-directory: bindings/python
@@ -104,6 +105,20 @@ jobs:
           command: build
           args: --release -o dist -i python3.9
           manylinux: ${{ matrix.manylinux || 'auto' }}
+          before-script-linux: &protoc-install |
+            set -e
+            ARCH=$(uname -m)
+            case "$ARCH" in
+              x86_64)  ZIP=protoc-27.1-linux-x86_64.zip ;;
+              aarch64) ZIP=protoc-27.1-linux-aarch_64.zip ;;
+              *) echo "Unsupported arch $ARCH"; exit 1 ;;
+            esac
+            curl -sLO 
"https://github.com/protocolbuffers/protobuf/releases/download/v27.1/${ZIP}";
+            python3 -c "import zipfile; 
zipfile.ZipFile('${ZIP}').extractall('/tmp/protoc_install')"
+            chmod +x /tmp/protoc_install/bin/protoc
+            rm -f "${ZIP}"
+            export PATH="/tmp/protoc_install/bin:$PATH"
+            export PROTOC=/tmp/protoc_install/bin/protoc
       - uses: PyO3/maturin-action@v1
         with:
           working-directory: bindings/python
@@ -111,6 +126,7 @@ jobs:
           command: build
           args: --release -o dist -i python3.10
           manylinux: ${{ matrix.manylinux || 'auto' }}
+          before-script-linux: *protoc-install
       - uses: PyO3/maturin-action@v1
         with:
           working-directory: bindings/python
@@ -118,6 +134,7 @@ jobs:
           command: build
           args: --release -o dist -i python3.11
           manylinux: ${{ matrix.manylinux || 'auto' }}
+          before-script-linux: *protoc-install
       - uses: PyO3/maturin-action@v1
         with:
           working-directory: bindings/python
@@ -125,6 +142,7 @@ jobs:
           command: build
           args: --release -o dist -i python3.12
           manylinux: ${{ matrix.manylinux || 'auto' }}
+          before-script-linux: *protoc-install
 
       - name: Upload wheels
         uses: actions/upload-artifact@v4
diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml
index 9cf20e3..30ac046 100644
--- a/bindings/python/Cargo.toml
+++ b/bindings/python/Cargo.toml
@@ -27,7 +27,7 @@ name = "fluss"
 crate-type = ["cdylib"]
 
 [dependencies]
-pyo3 = { version = "0.26.0", features = ["extension-module"] }
+pyo3 = { version = "0.26.0", features = ["extension-module", 
"generate-import-lib"] }
 fluss = { workspace = true, features = ["storage-all"] }
 tokio = { workspace = true }
 arrow = { workspace = true }

Reply via email to