Skip to content

Commit d629c40

Browse files
fix: 修正 multibuild 架构识别
1 parent 5b55c8c commit d629c40

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

.github/workflows/build-manywheel-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
run: |
4242
mkdir -p docker/manylinux_2_38
4343
wget -qO docker/manylinux_2_38/Dockerfile_loongarch64 https://github.com/opencv/opencv-python/raw/refs/tags/${version}/docker/manylinux2014/Dockerfile_x86_64
44-
patch -p1 < loong64.patch
44+
patch -p1 < manylinux_loong64.patch
4545
cd docker/manylinux_2_38
4646
sed -i "s@FROM quay.io/pypa/manylinux2014_x86_64@FROM ghcr.io/loong64/manylinux_2_38_loongarch64@g" Dockerfile_loongarch64
4747
image_tag=$(cat Dockerfile_loongarch64 | grep "Version:" | sed 's/# Version: //')

.github/workflows/build_wheels_linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ jobs:
7878
fetch-depth: 0
7979
- name: Setup QEMU
8080
uses: docker/setup-qemu-action@v3
81-
- name: Pull image
82-
run: docker pull --platform linux/loong64 ${{ env.DOCKER_IMAGE }}
81+
- name: Patch build
82+
run: wget -qO - https://github.com/loong64/opencv-python/raw/refs/heads/master/multibuild_loong64.patch | patch -p1
8383
- name: Build a package
8484
run: source scripts/build.sh
8585
- name: Saving a wheel accordingly to matrix

.github/workflows/build_wheels_linux_custom.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
- name: Setup Qemu
5555
uses: docker/setup-qemu-action@v3
5656
- name: Patch build
57-
run: sed -i 's@docker pull@docker pull --platform linux/loong64@g' multibuild/travis_linux_steps.sh
57+
run: wget -qO - https://github.com/loong64/opencv-python/raw/refs/heads/master/multibuild_loong64.patch | patch -p1
5858
- name: Build a package
5959
run: source scripts/build.sh
6060
- name: Saving a wheel accordingly to matrix
File renamed without changes.

multibuild_loong64.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/scripts/build.sh b/scripts/build.sh
2+
index e5c83d8..76432d3 100755
3+
--- a/scripts/build.sh
4+
+++ b/scripts/build.sh
5+
@@ -5,6 +5,7 @@ set -e
6+
# Multibuild doesn't have releases, so --depth would break eventually (see
7+
# https://superuser.com/questions/1240216/server-does-not-allow-request-for-unadvertised)
8+
git submodule update --init multibuild
9+
+sed -i 's@docker pull@docker pull --platform linux/loong64@g' multibuild/travis_linux_steps.sh
10+
source multibuild/common_utils.sh
11+
# https://github.com/matthew-brett/multibuild/issues/116
12+
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export ARCH_FLAGS=" "; fi

0 commit comments

Comments
 (0)