From ec3604aae5cd0bee4b05dbf102dc3956728b4eff Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov <2536374+asmorkalov@users.noreply.github.com> Date: Tue, 3 Dec 2024 15:39:28 +0300 Subject: [PATCH 1/3] Revert "5.x merge 4.x and submodules update" --- .gitmodules | 3 --- find_version.py | 2 +- opencv | 2 +- opencv_contrib | 2 +- opencv_extra | 2 +- pyproject.toml | 2 +- setup.py | 2 +- 7 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.gitmodules b/.gitmodules index 99476363..7193d3b9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,12 @@ [submodule "opencv"] path = opencv url = https://github.com/opencv/opencv.git - branch = 5.x [submodule "opencv_contrib"] path = opencv_contrib url = https://github.com/opencv/opencv_contrib.git - branch = 5.x [submodule "multibuild"] path = multibuild url = https://github.com/multi-build/multibuild.git [submodule "opencv_extra"] path = opencv_extra url = https://github.com/opencv/opencv_extra.git - branch = 5.x diff --git a/find_version.py b/find_version.py index 274c93e6..13e8003c 100644 --- a/find_version.py +++ b/find_version.py @@ -65,7 +65,7 @@ else: # local version identifier, not to be published on PyPI version = git_hash - opencv_version += ".{}".format(version) + opencv_version += "+{}".format(version) with open("cv2/version.py", "w") as f: f.write('opencv_version = "{}"\n'.format(opencv_version)) diff --git a/opencv b/opencv index b31bc1a2..71d3237a 160000 --- a/opencv +++ b/opencv @@ -1 +1 @@ -Subproject commit b31bc1a2954e22d87f8384212c5e3dfbe7024f16 +Subproject commit 71d3237a093b60a27601c20e9ee6c3e52154e8b1 diff --git a/opencv_contrib b/opencv_contrib index f7d6288a..1ed3dd2c 160000 --- a/opencv_contrib +++ b/opencv_contrib @@ -1 +1 @@ -Subproject commit f7d6288aeb38ff1b8af70ecf50a98258e8cd1bef +Subproject commit 1ed3dd2c53888e3289afdb22ec4e9ebbff3dba87 diff --git a/opencv_extra b/opencv_extra index 0e3b933a..dd1fbd07 160000 --- a/opencv_extra +++ b/opencv_extra @@ -1 +1 @@ -Subproject commit 0e3b933aa762b28b54a40034c58f8c734f1ed759 +Subproject commit dd1fbd0717ef4d83f86899b4144fdd9bc0364a5f diff --git a/pyproject.toml b/pyproject.toml index 270a25d1..71de7f9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "cmake>=3.13", + "cmake>=3.1", "numpy==1.13.3; python_version=='3.6' and platform_machine != 'aarch64' and platform_machine != 'arm64'", "numpy==1.17.0; python_version=='3.7' and platform_machine != 'aarch64' and platform_machine != 'arm64'", "numpy==1.17.5; python_version=='3.8' and platform_machine != 'aarch64' and platform_machine != 'arm64'", diff --git a/setup.py b/setup.py index edf813b4..48d5a65f 100644 --- a/setup.py +++ b/setup.py @@ -140,7 +140,7 @@ def main(): [ r"python/cv2/py.typed" ] if sys.version_info >= (3, 6) else [] , "cv2.data": [ # OPENCV_OTHER_INSTALL_PATH - ("etc" if os.name == "nt" else "share/opencv5") + r"/haarcascades/.*\.xml" + ("etc" if os.name == "nt" else "share/opencv4") + r"/haarcascades/.*\.xml" ], "cv2.gapi": [ "python/cv2" + r"/gapi/.*\.py" From 3f50d3281f82d1c6733bbb2872adacca29995e12 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov <2536374+asmorkalov@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:07:30 +0300 Subject: [PATCH 2/3] Linux dependencies update (#1052) * Base manylinux2014 image update. * Use command line git to checkout repo instead of actions step. * Qt and others update. * Updated submodules to current 4.x branch. --- .github/workflows/build_wheels_linux.yml | 28 ++++++++++---------- .github/workflows/build_wheels_linux_arm.yml | 18 ++++++------- docker/manylinux2014/Dockerfile_aarch64 | 12 ++++----- docker/manylinux2014/Dockerfile_x86_64 | 12 ++++----- opencv | 2 +- opencv_contrib | 2 +- opencv_extra | 2 +- patches/patchQtPlugins | 2 +- travis_config.sh | 2 +- 9 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index 746395e4..9df69240 100644 --- a/.github/workflows/build_wheels_linux.yml +++ b/.github/workflows/build_wheels_linux.yml @@ -41,7 +41,7 @@ jobs: MB_ML_VER: 2014 TRAVIS_BUILD_DIR: ${{ github.workspace }} CONFIG_PATH: travis_config.sh - DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20240524 + DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20241202 USE_CCACHE: 0 UNICODE_WIDTH: 32 PLAT: x86_64 @@ -58,10 +58,10 @@ jobs: echo "ENABLE_ROLLING=1" >> $GITHUB_ENV fi - name: Checkout - uses: actions/checkout@v3 - with: - submodules: false - fetch-depth: 0 + run: | + echo "Source branch name: ${{ github.head_ref }}" + echo "Target branch name: ${{ github.base_ref }}" + git clone --depth 1 -b "${{ github.head_ref }}" "https://github.com/${{ github.event.pull_request.head.repo.full_name }}" "${{ github.workspace }}" - name: Build a package run: source scripts/build.sh - name: Saving all wheels @@ -101,10 +101,10 @@ jobs: run: find . -mindepth 1 -delete working-directory: ${{ github.workspace }} - name: Checkout - uses: actions/checkout@v3 - with: - submodules: true - fetch-depth: 0 + run: | + echo "Source branch name: ${{ github.head_ref }}" + echo "Target branch name: ${{ github.base_ref }}" + git clone --depth 1 --recurse-submodules -b "${{ github.head_ref }}" "https://github.com/${{ github.event.pull_request.head.repo.full_name }}" "${{ github.workspace }}" - name: Setup Environment variables run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi - name: Download a wheel accordingly to matrix @@ -139,7 +139,7 @@ jobs: NP_TEST_DEP: numpy==1.19.4 TRAVIS_BUILD_DIR: ${{ github.workspace }} CONFIG_PATH: travis_config.sh - DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20240524 + DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20241202 USE_CCACHE: 1 UNICODE_WIDTH: 32 SDIST: ${{ matrix.build_sdist || 0 }} @@ -155,10 +155,10 @@ jobs: echo "ENABLE_ROLLING=1" >> $GITHUB_ENV fi - name: Checkout - uses: actions/checkout@v3 - with: - submodules: false - fetch-depth: 0 + run: | + echo "Source branch name: ${{ github.head_ref }}" + echo "Target branch name: ${{ github.base_ref }}" + git clone --depth 1 -b "${{ github.head_ref }}" "https://github.com/${{ github.event.pull_request.head.repo.full_name }}" "${{ github.workspace }}" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: diff --git a/.github/workflows/build_wheels_linux_arm.yml b/.github/workflows/build_wheels_linux_arm.yml index 928ded7d..bd5c0040 100644 --- a/.github/workflows/build_wheels_linux_arm.yml +++ b/.github/workflows/build_wheels_linux_arm.yml @@ -42,7 +42,7 @@ jobs: MB_ML_VER: 2014 TRAVIS_BUILD_DIR: ${{ github.workspace }} CONFIG_PATH: travis_config.sh - DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20240524 + DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20241202 USE_CCACHE: 0 UNICODE_WIDTH: 32 SDIST: ${{ matrix.build_sdist || 0 }} @@ -58,10 +58,10 @@ jobs: echo "ENABLE_ROLLING=1" >> $GITHUB_ENV fi - name: Checkout - uses: actions/checkout@v3 - with: - submodules: false - fetch-depth: 0 + run: | + echo "Source branch name: ${{ github.head_ref }}" + echo "Target branch name: ${{ github.base_ref }}" + git clone --depth 1 -b "${{ github.head_ref }}" "https://github.com/${{ github.event.pull_request.head.repo.full_name }}" "${{ github.workspace }}" - name: Build a package run: source scripts/build.sh - name: Saving all wheels @@ -103,10 +103,10 @@ jobs: run: find . -mindepth 1 -delete working-directory: ${{ github.workspace }} - name: Checkout - uses: actions/checkout@v3 - with: - submodules: true - fetch-depth: 0 + run: | + echo "Source branch name: ${{ github.head_ref }}" + echo "Target branch name: ${{ github.base_ref }}" + git clone --depth 1 --recurse-submodules -b "${{ github.head_ref }}" "https://github.com/${{ github.event.pull_request.head.repo.full_name }}" "${{ github.workspace }}" - name: Setup Environment variables run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi - name: Download a wheel accordingly to matrix diff --git a/docker/manylinux2014/Dockerfile_aarch64 b/docker/manylinux2014/Dockerfile_aarch64 index e19492ff..9a8bfdde 100644 --- a/docker/manylinux2014/Dockerfile_aarch64 +++ b/docker/manylinux2014/Dockerfile_aarch64 @@ -1,16 +1,16 @@ -# Version: 20240524 +# Version: 20241202 # Image name: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64 FROM quay.io/pypa/manylinux2014_aarch64:latest ARG CCACHE_VERSION=3.7.9 -ARG FFMPEG_VERSION=5.1.4 -ARG FREETYPE_VERSION=2.13.2 -ARG LIBPNG_VERSION=1.6.43 -ARG VPX_VERSION=v1.14.0 +ARG FFMPEG_VERSION=5.1.6 +ARG FREETYPE_VERSION=2.13.3 +ARG LIBPNG_VERSION=1.6.44 +ARG VPX_VERSION=v1.15.0 ARG NASM_VERSION=2.15.04 ARG OPENSSL_VERSION=1_1_1w -ARG QT_VERSION=5.15.13 +ARG QT_VERSION=5.15.16 ARG YASM_VERSION=1.3.0 ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH diff --git a/docker/manylinux2014/Dockerfile_x86_64 b/docker/manylinux2014/Dockerfile_x86_64 index eceae25e..088d8df5 100644 --- a/docker/manylinux2014/Dockerfile_x86_64 +++ b/docker/manylinux2014/Dockerfile_x86_64 @@ -1,16 +1,16 @@ -# Version: 20240524 +# Version: 20241202 # Image name: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64 FROM quay.io/pypa/manylinux2014_x86_64:latest ARG CCACHE_VERSION=3.7.9 -ARG FFMPEG_VERSION=5.1.4 -ARG FREETYPE_VERSION=2.13.2 -ARG LIBPNG_VERSION=1.6.43 -ARG VPX_VERSION=v1.14.0 +ARG FFMPEG_VERSION=5.1.6 +ARG FREETYPE_VERSION=2.13.3 +ARG LIBPNG_VERSION=1.6.44 +ARG VPX_VERSION=v1.15.0 ARG NASM_VERSION=2.15.04 ARG OPENSSL_VERSION=1_1_1w -ARG QT_VERSION=5.15.13 +ARG QT_VERSION=5.15.16 ARG YASM_VERSION=1.3.0 ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH diff --git a/opencv b/opencv index 71d3237a..03cedee0 160000 --- a/opencv +++ b/opencv @@ -1 +1 @@ -Subproject commit 71d3237a093b60a27601c20e9ee6c3e52154e8b1 +Subproject commit 03cedee0b0258875eafd1576b59d686ba805da7a diff --git a/opencv_contrib b/opencv_contrib index 1ed3dd2c..67337620 160000 --- a/opencv_contrib +++ b/opencv_contrib @@ -1 +1 @@ -Subproject commit 1ed3dd2c53888e3289afdb22ec4e9ebbff3dba87 +Subproject commit 673376203b0a8371a31ec5e8f08910a9744c0f32 diff --git a/opencv_extra b/opencv_extra index dd1fbd07..08fe33c7 160000 --- a/opencv_extra +++ b/opencv_extra @@ -1 +1 @@ -Subproject commit dd1fbd0717ef4d83f86899b4144fdd9bc0364a5f +Subproject commit 08fe33c733cabec70ffb6e5eac49708b073e5277 diff --git a/patches/patchQtPlugins b/patches/patchQtPlugins index 70c6975a..b274aa08 100644 --- a/patches/patchQtPlugins +++ b/patches/patchQtPlugins @@ -9,7 +9,7 @@ index 4c0b3880fc..dffa0a4caa 100644 + install(DIRECTORY ${Qt5_DIR}/../../../plugins DESTINATION lib/qt) + endif() + if(UNIX AND NOT APPLE) -+ install(DIRECTORY /opt/Qt5.15.13/plugins DESTINATION lib/qt) ++ install(DIRECTORY /opt/Qt5.15.16/plugins DESTINATION lib/qt) + install(DIRECTORY /usr/share/fonts DESTINATION lib/qt) + endif() if(HAVE_QT_OPENGL) diff --git a/travis_config.sh b/travis_config.sh index 903ceafb..fcdd4f60 100644 --- a/travis_config.sh +++ b/travis_config.sh @@ -34,7 +34,7 @@ if [ -n "$IS_OSX" ]; then export MAKEFLAGS="-j$(sysctl -n hw.ncpu)" else echo " > Linux environment " - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/Qt5.15.13/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/Qt5.15.16/lib export MAKEFLAGS="-j$(grep -E '^processor[[:space:]]*:' /proc/cpuinfo | wc -l)" CURRENT_ARCH=$(uname -m) if [[ $CURRENT_ARCH == 'aarch64' ]]; then From b12aea12d288351b542a83d98333a35c95eb1dea Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Wed, 4 Dec 2024 11:10:09 +0300 Subject: [PATCH 3/3] Try to update to macos-13 to fix home brew dependencies. --- .github/workflows/build_wheels_macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels_macos.yml b/.github/workflows/build_wheels_macos.yml index 97df456e..6940cc55 100644 --- a/.github/workflows/build_wheels_macos.yml +++ b/.github/workflows/build_wheels_macos.yml @@ -20,7 +20,7 @@ on: jobs: Build: - runs-on: macos-12 + runs-on: macos-13 defaults: run: shell: bash @@ -98,7 +98,7 @@ jobs: Test: needs: [Build] - runs-on: macos-12 + runs-on: macos-13 defaults: run: shell: bash