From 7ba53fc4f48894593bda7493709d542e38e2c36d Mon Sep 17 00:00:00 2001 From: Andrey Senyaev Date: Fri, 25 Mar 2022 11:52:15 +0300 Subject: [PATCH 1/3] Revert changes for pre-downloaded files --- .github/workflows/build_wheels_linux.yml | 2 -- scripts/source-packages-preparation.sh | 20 -------------------- setup.py | 2 -- 3 files changed, 24 deletions(-) delete mode 100755 scripts/source-packages-preparation.sh diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index 3e3e010b..a368661d 100644 --- a/.github/workflows/build_wheels_linux.yml +++ b/.github/workflows/build_wheels_linux.yml @@ -171,8 +171,6 @@ jobs: - name: Build a package run: | - # Download all 3rdparty files - source scripts/source-packages-preparation.sh ${{ github.workspace }} set -e # Build and package set -x diff --git a/scripts/source-packages-preparation.sh b/scripts/source-packages-preparation.sh deleted file mode 100755 index be49b5b8..00000000 --- a/scripts/source-packages-preparation.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -# ${1} variable is a path to repository opencv-python - -# Define flags -if [ "0" == $ENABLE_CONTRIB ]; then - git submodule update --init opencv - EXTRA_CMAKE_OPTIONS="-DOPENCV_DOWNLOAD_PATH=${1}/opencv/3rdparty" -else - git submodule update --init opencv opencv_contrib - EXTRA_CMAKE_OPTIONS="-DOPENCV_DOWNLOAD_PATH=${1}/opencv/3rdparty -DOPENCV_EXTRA_MODULES_PATH=${1}/opencv_contrib/modules" -fi - -# Download 3rdparty files -cd opencv && \ -mkdir generate && \ -cd generate && \ -cmake $EXTRA_CMAKE_OPTIONS ${1}/opencv && \ -cd ${1} && \ -rm -rf opencv/generate diff --git a/setup.py b/setup.py index c9f09212..5b79e389 100644 --- a/setup.py +++ b/setup.py @@ -162,8 +162,6 @@ def main(): "-DPYTHON3_LIMITED_API=ON", "-DBUILD_OPENEXR=ON", "-DBUILD_PNG=ON", - # To have all 3rdparty files in one place for source packages - "-DOPENCV_DOWNLOAD_PATH=%s" % (os.path.join(os.path.dirname(os.path.abspath(__file__)), "opencv", "3rdparty")), ] + ( # If it is not defined 'linker flags: /machine:X86' on Windows x64 From ad010427c7197033532b3f2238b273bb9a5513fb Mon Sep 17 00:00:00 2001 From: Andrey Senyaev Date: Fri, 25 Mar 2022 17:10:44 +0300 Subject: [PATCH 2/3] Skip only gapi if it was not found --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c9f09212..2fbdc816 100644 --- a/setup.py +++ b/setup.py @@ -414,7 +414,8 @@ def _classify_installed_files_override( final_install_relpaths.append(new_install_relpath) del m, fslash_relpath, new_install_relpath else: - if not found: + # gapi can be missed if ADE was not downloaded (network issue) + if not found and "gapi" not in relpath_re: raise Exception("Not found: '%s'" % relpath_re) del r, found From f68be384bb0310f1fdf95351fdffda7bf288b8d1 Mon Sep 17 00:00:00 2001 From: Andrey Senyaev Date: Fri, 25 Mar 2022 17:10:44 +0300 Subject: [PATCH 3/3] Skip only gapi if it was not found --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5b79e389..5784d5a4 100644 --- a/setup.py +++ b/setup.py @@ -412,7 +412,8 @@ def _classify_installed_files_override( final_install_relpaths.append(new_install_relpath) del m, fslash_relpath, new_install_relpath else: - if not found: + # gapi can be missed if ADE was not downloaded (network issue) + if not found and "gapi" not in relpath_re: raise Exception("Not found: '%s'" % relpath_re) del r, found