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

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

commit 94893f37567431c379995f137c96d829fa3e63ec
Author: luoyuxia <[email protected]>
AuthorDate: Tue Mar 3 18:58:29 2026 +0800

    chore: fix build python wheel issue again
---
 .github/workflows/release_python.yml | 69 ++++++++++++++++++++++++++++++++----
 1 file changed, 63 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/release_python.yml 
b/.github/workflows/release_python.yml
index 3a2d3b2..74ebacb 100644
--- a/.github/workflows/release_python.yml
+++ b/.github/workflows/release_python.yml
@@ -88,12 +88,9 @@ jobs:
       - name: Generate Python README
         run: python3 bindings/python/generate_readme.py
 
-      - name: Install protoc via grpcio-tools (manylinux)
-        if: matrix.manylinux != ''
-        run: |
-          pip install grpcio-tools
-          PROTOC=$(python -c "import grpc_tools, os; 
print(os.path.join(os.path.dirname(grpc_tools.__file__), 'protoc'))")
-          echo "PROTOC=$PROTOC" >> $GITHUB_ENV
+      - name: Install protoc (Linux host)
+        if: runner.os == 'Linux'
+        run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
 
       - uses: PyO3/maturin-action@v1
         with:
@@ -102,6 +99,21 @@ jobs:
           command: build
           args: --release -o dist -i python3.9
           manylinux: ${{ matrix.manylinux || 'auto' }}
+          container: ${{ matrix.os == 'ubuntu-latest' && matrix.target == 
'x86_64' && 'off' || '' }}
+          before-script-linux: |
+            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}";
+            unzip -o "${ZIP}" -d /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
@@ -109,6 +121,21 @@ jobs:
           command: build
           args: --release -o dist -i python3.10
           manylinux: ${{ matrix.manylinux || 'auto' }}
+          container: ${{ matrix.os == 'ubuntu-latest' && matrix.target == 
'x86_64' && 'off' || '' }}
+          before-script-linux: |
+            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}";
+            unzip -o "${ZIP}" -d /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
@@ -116,6 +143,21 @@ jobs:
           command: build
           args: --release -o dist -i python3.11
           manylinux: ${{ matrix.manylinux || 'auto' }}
+          container: ${{ matrix.os == 'ubuntu-latest' && matrix.target == 
'x86_64' && 'off' || '' }}
+          before-script-linux: |
+            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}";
+            unzip -o "${ZIP}" -d /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
@@ -123,6 +165,21 @@ jobs:
           command: build
           args: --release -o dist -i python3.12
           manylinux: ${{ matrix.manylinux || 'auto' }}
+          container: ${{ matrix.os == 'ubuntu-latest' && matrix.target == 
'x86_64' && 'off' || '' }}
+          before-script-linux: |
+            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}";
+            unzip -o "${ZIP}" -d /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
 
       - name: Upload wheels
         uses: actions/upload-artifact@v4

Reply via email to