From 8f26419d49c214593c62988619f7f427702f0988 Mon Sep 17 00:00:00 2001 From: Andrey Senyaev Date: Tue, 13 Dec 2022 00:10:36 +0300 Subject: [PATCH 1/2] Update pypi default index url --- .github/workflows/build_wheels_macos_m1.yml | 2 ++ travis_config.sh | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/build_wheels_macos_m1.yml b/.github/workflows/build_wheels_macos_m1.yml index b51801ab..5e60c47d 100644 --- a/.github/workflows/build_wheels_macos_m1.yml +++ b/.github/workflows/build_wheels_macos_m1.yml @@ -34,6 +34,7 @@ jobs: SDIST: ${{ matrix.build_sdist || 0 }} ENABLE_HEADLESS: ${{ matrix.without_gui }} ENABLE_CONTRIB: ${{ matrix.with_contrib }} + PIP_INDEX_URL: https://pypi.tuna.tsinghua.edu.cn/simple steps: - name: Cleanup run: find . -mindepth 1 -delete @@ -82,6 +83,7 @@ jobs: env: OPENCV_TEST_DATA_PATH: ${{ github.workspace }}/opencv_extra/testdata PYLINT_TEST_FILE: ${{ github.workspace }}/opencv/samples/python/squares.py + PIP_INDEX_URL: https://pypi.tuna.tsinghua.edu.cn/simple steps: - name: Cleanup run: find . -mindepth 1 -delete diff --git a/travis_config.sh b/travis_config.sh index 366d35ad..042cbd43 100644 --- a/travis_config.sh +++ b/travis_config.sh @@ -36,6 +36,11 @@ else echo " > Linux environment " export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/Qt5.15.0/lib export MAKEFLAGS="-j$(grep -E '^processor[[:space:]]*:' /proc/cpuinfo | wc -l)" + if [[ $PLAT == 'aarch64' ]]; then + # To avoid network issues with pypi.org on OpenCV CN machines + export PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple + echo "Running for linux aarch64" + fi fi if [ -n "$IS_OSX" ]; then From 7da6fce0b06e8692f53d828f087e6fe5db61e098 Mon Sep 17 00:00:00 2001 From: Andrey Senyaev <76472231+asenyaev@users.noreply.github.com> Date: Tue, 13 Dec 2022 02:09:21 +0300 Subject: [PATCH 2/2] Define arch for all workflows on aarch64 --- travis_config.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/travis_config.sh b/travis_config.sh index 042cbd43..10182f91 100644 --- a/travis_config.sh +++ b/travis_config.sh @@ -36,7 +36,8 @@ else echo " > Linux environment " export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/Qt5.15.0/lib export MAKEFLAGS="-j$(grep -E '^processor[[:space:]]*:' /proc/cpuinfo | wc -l)" - if [[ $PLAT == 'aarch64' ]]; then + CURRENT_ARCH=$(uname -m) + if [[ $CURRENT_ARCH == 'aarch64' ]]; then # To avoid network issues with pypi.org on OpenCV CN machines export PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple echo "Running for linux aarch64"