From fc127ae098f394313ca26bac1435aafa448a312c Mon Sep 17 00:00:00 2001 From: Aditya Kumar Date: Sun, 20 Apr 2025 08:33:21 +0530 Subject: [PATCH 1/7] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3a4b46c2..6de64d64 100644 --- a/README.md +++ b/README.md @@ -242,6 +242,7 @@ Python 3.x compatible pre-built wheels are provided for the officially supported - 3.10 - 3.11 - 3.12 +- 3.13 ### Backward compatibility From 416ec8b3c6d5514ea7b78d816b247dfc1c240c55 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Wed, 18 Jun 2025 17:10:23 +0300 Subject: [PATCH 2/7] OpenCV submodules update. --- opencv | 2 +- opencv_contrib | 2 +- opencv_extra | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opencv b/opencv index 31b0eeea..bbaed6f3 160000 --- a/opencv +++ b/opencv @@ -1 +1 @@ -Subproject commit 31b0eeea0b44b370fd0712312df4214d4ae1b158 +Subproject commit bbaed6f377e7ed118b977ff178029403a6e30eea diff --git a/opencv_contrib b/opencv_contrib index 0e5254eb..1e4d4e0f 160000 --- a/opencv_contrib +++ b/opencv_contrib @@ -1 +1 @@ -Subproject commit 0e5254ebf54d2aed6e7eaf6660bf3b797cf50a02 +Subproject commit 1e4d4e0f3e4c7d6d7ab9d738026fe13d3cd85cf4 diff --git a/opencv_extra b/opencv_extra index a74cf6ba..8926a390 160000 --- a/opencv_extra +++ b/opencv_extra @@ -1 +1 @@ -Subproject commit a74cf6bae7fd75d91282b877c559168b3a62148a +Subproject commit 8926a3906a44733d68485c703de1c8a765577246 From fa50138c30ca70851a5893d02f059c2c509d88d2 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Mon, 30 Jun 2025 18:22:24 +0300 Subject: [PATCH 3/7] BLAS search fix on Linux after chanages in main OpenCV. --- .github/workflows/build_wheels_linux.yml | 4 ++-- .github/workflows/build_wheels_linux_arm.yml | 2 +- docker/manylinux2014/Dockerfile_aarch64 | 4 ++-- docker/manylinux2014/Dockerfile_x86_64 | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index 7e2f836e..d8fa7c46 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:20250611 + DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20250630 USE_CCACHE: 0 UNICODE_WIDTH: 32 PLAT: x86_64 @@ -134,7 +134,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:20250611 + DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20250630 USE_CCACHE: 1 UNICODE_WIDTH: 32 SDIST: ${{ matrix.build_sdist || 0 }} diff --git a/.github/workflows/build_wheels_linux_arm.yml b/.github/workflows/build_wheels_linux_arm.yml index d802204e..04acb2a3 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:20250611 + DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20250630 USE_CCACHE: 0 UNICODE_WIDTH: 32 SDIST: ${{ matrix.build_sdist || 0 }} diff --git a/docker/manylinux2014/Dockerfile_aarch64 b/docker/manylinux2014/Dockerfile_aarch64 index e991029c..98cd3125 100644 --- a/docker/manylinux2014/Dockerfile_aarch64 +++ b/docker/manylinux2014/Dockerfile_aarch64 @@ -1,4 +1,4 @@ -# Version: 20250611 +# Version: 20250630 # Image name: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64 FROM quay.io/pypa/manylinux2014_aarch64:latest @@ -21,7 +21,7 @@ ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH RUN yum install zlib-devel curl-devel xcb-util-renderutil-devel xcb-util-devel xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel mesa-libGL-devel libxkbcommon-devel libxkbcommon-x11-devel libXi-devel lapack-devel epel-release -y && \ yum install openblas-devel dejavu-sans-fonts -y && \ cp /usr/include/lapacke/lapacke*.h /usr/include/ && \ - curl https://raw.githubusercontent.com/xianyi/OpenBLAS/v0.3.3/cblas.h -o /usr/include/cblas.h && \ + cp /usr/include/openblas/*.h /usr/include/ && \ # libpng will be built from source yum remove libpng -y diff --git a/docker/manylinux2014/Dockerfile_x86_64 b/docker/manylinux2014/Dockerfile_x86_64 index 8adbc8a6..3ed3aa49 100644 --- a/docker/manylinux2014/Dockerfile_x86_64 +++ b/docker/manylinux2014/Dockerfile_x86_64 @@ -1,4 +1,4 @@ -# Version: 20250611 +# Version: 20250630 # Image name: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64 FROM quay.io/pypa/manylinux2014_x86_64:latest @@ -20,8 +20,8 @@ ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH # epel-release need for aarch64 to get openblas packages RUN yum install zlib-devel curl-devel xcb-util-renderutil-devel xcb-util-devel xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel mesa-libGL-devel libxkbcommon-devel libxkbcommon-x11-devel libXi-devel lapack-devel epel-release -y && \ yum install openblas-devel dejavu-sans-fonts -y && \ + cp /usr/include/openblas/*.h /usr/include/ && \ cp /usr/include/lapacke/lapacke*.h /usr/include/ && \ - curl https://raw.githubusercontent.com/xianyi/OpenBLAS/v0.3.3/cblas.h -o /usr/include/cblas.h && \ # libpng will be built from source yum remove libpng -y From b5f684cdc36c3b7aee6d57a10c7cf561dc049794 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Thu, 3 Jul 2025 11:16:24 +0300 Subject: [PATCH 4/7] Updated OpenCV to release 4.12.0. --- opencv | 2 +- opencv_contrib | 2 +- opencv_extra | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opencv b/opencv index bbaed6f3..49486f61 160000 --- a/opencv +++ b/opencv @@ -1 +1 @@ -Subproject commit bbaed6f377e7ed118b977ff178029403a6e30eea +Subproject commit 49486f61fb25722cbcf586b7f4320921d46fb38e diff --git a/opencv_contrib b/opencv_contrib index 1e4d4e0f..d943e1d6 160000 --- a/opencv_contrib +++ b/opencv_contrib @@ -1 +1 @@ -Subproject commit 1e4d4e0f3e4c7d6d7ab9d738026fe13d3cd85cf4 +Subproject commit d943e1d61c8bc556a13783e1546ee7c1a9e0b1cf diff --git a/opencv_extra b/opencv_extra index 8926a390..b6db059e 160000 --- a/opencv_extra +++ b/opencv_extra @@ -1 +1 @@ -Subproject commit 8926a3906a44733d68485c703de1c8a765577246 +Subproject commit b6db059e9b80072d80d009d2ab344f8606a8e964 From 957adcfdcd5c5c7b386de7e14436416523b7081f Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Thu, 3 Jul 2025 18:39:28 +0300 Subject: [PATCH 5/7] Updated Windows build environment to 2025. 2019 - retired. --- .github/workflows/build_wheels_windows.yml | 9 +++++---- setup.py | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index a1a36ff8..329f60de 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -19,7 +19,7 @@ on: jobs: Build: - runs-on: windows-2019 + runs-on: windows-2025 strategy: fail-fast: false matrix: @@ -48,7 +48,7 @@ jobs: echo "ENABLE_ROLLING=1" >> $GITHUB_ENV fi - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: false fetch-depth: 0 @@ -79,7 +79,7 @@ jobs: Test: needs: [Build] - runs-on: windows-2019 + runs-on: windows-2025 defaults: run: shell: cmd @@ -95,6 +95,7 @@ jobs: ACTIONS_ALLOW_UNSECURE_COMMANDS: true OPENCV_TEST_DATA_PATH: ${{ github.workspace }}\opencv_extra\testdata PYLINT_TEST_FILE: ${{ github.workspace }}\opencv\samples\python\squares.py + PlatformToolset: v143 steps: - name: Cleanup shell: bash @@ -103,7 +104,7 @@ jobs: rm -rf ./.??* || true working-directory: ${{ github.workspace }} - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: true fetch-depth: 0 diff --git a/setup.py b/setup.py index 9aff8d23..3ab0495d 100755 --- a/setup.py +++ b/setup.py @@ -163,7 +163,7 @@ def main(): files_outside_package_dir = {"cv2": ["LICENSE.txt", "LICENSE-3RD-PARTY.txt"]} ci_cmake_generator = ( - ["-G", "Visual Studio 14" + (" Win64" if is64 else "")] + ["-G", "Visual Studio 17 2022"] if os.name == "nt" else ["-G", "Unix Makefiles"] ) From 7a9ed05ca7e59829d24c9eb57bc7289dd68b73d6 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Fri, 4 Jul 2025 09:07:09 +0300 Subject: [PATCH 6/7] Updated numpy dependencies. --- .github/workflows/build_wheels_linux.yml | 4 +--- .github/workflows/build_wheels_linux_arm.yml | 4 +--- .github/workflows/build_wheels_macos.yml | 4 +--- .github/workflows/build_wheels_macos_m1.yml | 2 -- .github/workflows/build_wheels_windows.yml | 2 -- pyproject.toml | 9 +++------ setup.py | 14 ++++---------- 7 files changed, 10 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index d8fa7c46..2f4ff9ce 100644 --- a/.github/workflows/build_wheels_linux.yml +++ b/.github/workflows/build_wheels_linux.yml @@ -3,8 +3,6 @@ name: Linux x86_64 on: pull_request: branches: - - master - - 3.4 - 4.x - 5.x paths-ignore: @@ -88,7 +86,7 @@ jobs: ACTIONS_ALLOW_UNSECURE_COMMANDS: true MB_PYTHON_VERSION: ${{ matrix.python-version }} NP_TEST_DEP: numpy==1.19.4 - NP_TEST_DEP_LATEST: numpy==2.2.1 + NP_TEST_DEP_LATEST: numpy==2.2.6 CONFIG_PATH: travis_config.sh PLAT: x86_64 steps: diff --git a/.github/workflows/build_wheels_linux_arm.yml b/.github/workflows/build_wheels_linux_arm.yml index 04acb2a3..58b06747 100644 --- a/.github/workflows/build_wheels_linux_arm.yml +++ b/.github/workflows/build_wheels_linux_arm.yml @@ -3,8 +3,6 @@ name: Linux ARM64 on: pull_request: branches: - - master - - 3.4 - 4.x - 5.x paths-ignore: @@ -89,7 +87,7 @@ jobs: MB_PYTHON_VERSION: ${{ matrix.python-version }} PLAT: aarch64 NP_TEST_DEP: numpy==1.19.4 - NP_TEST_DEP_LATEST: numpy==2.2.1 + NP_TEST_DEP_LATEST: numpy==2.2.6 CONFIG_PATH: travis_config.sh DOCKER_TEST_IMAGE: multibuild/focal_arm64v8 UNICODE_WIDTH: 32 diff --git a/.github/workflows/build_wheels_macos.yml b/.github/workflows/build_wheels_macos.yml index a1cad49e..6a84bda0 100644 --- a/.github/workflows/build_wheels_macos.yml +++ b/.github/workflows/build_wheels_macos.yml @@ -3,8 +3,6 @@ name: macOS x86_64 on: pull_request: branches: - - master - - 3.4 - 4.x - 5.x paths-ignore: @@ -109,7 +107,7 @@ jobs: ACTIONS_ALLOW_UNSECURE_COMMANDS: true MB_PYTHON_VERSION: ${{ matrix.python-version }} NP_TEST_DEP: numpy==1.19.4 - NP_TEST_DEP_LATEST: numpy==2.2.1 + NP_TEST_DEP_LATEST: numpy==2.2.6 CONFIG_PATH: travis_config.sh PLAT: x86_64 OPENCV_TEST_DATA_PATH: ${{ github.workspace }}/opencv_extra/testdata diff --git a/.github/workflows/build_wheels_macos_m1.yml b/.github/workflows/build_wheels_macos_m1.yml index 1e62c858..875efbf7 100644 --- a/.github/workflows/build_wheels_macos_m1.yml +++ b/.github/workflows/build_wheels_macos_m1.yml @@ -3,8 +3,6 @@ name: macOS ARM64 on: pull_request: branches: - - master - - 3.4 - 4.x - 5.x paths-ignore: diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 329f60de..1ee786a9 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -3,8 +3,6 @@ name: Windows x86_64 on: pull_request: branches: - - master - - 3.4 - 4.x - 5.x paths-ignore: diff --git a/pyproject.toml b/pyproject.toml index d70b49ef..58fba213 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,8 @@ [build-system] requires = [ - "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'", - "numpy==1.19.3; python_version<'3.9' and sys_platform == 'linux' and platform_machine == 'aarch64'", - "numpy==1.21.0; python_version<'3.9' and sys_platform == 'darwin' and platform_machine == 'arm64'", - "numpy>=2.0.0; python_version>='3.9'", + "numpy<2.0; python_version<'3.9'", + "numpy==2.0.2; python_version>='3.9' and python_version<'3.13'", + "numpy==2.1.3; python_version=='3.13'", "packaging", "pip", "scikit-build>=0.14.0", diff --git a/setup.py b/setup.py index 3ab0495d..89412187 100755 --- a/setup.py +++ b/setup.py @@ -22,17 +22,11 @@ def main(): build_java = "ON" if get_build_env_var_by_name("java") else "OFF" build_rolling = get_build_env_var_by_name("rolling") + # NOTE: since 2.3.0 numpy upgraded from manylinux2014 to manylinux_2_28 + # see https://numpy.org/doc/stable/release/2.3.0-notes.html#numpy-2-3-0-release-notes install_requires = [ - 'numpy>=1.13.3; python_version<"3.7"', - 'numpy>=1.17.0; python_version>="3.7"', # https://github.com/numpy/numpy/pull/13725 - 'numpy>=1.17.3; python_version>="3.8"', - 'numpy>=1.19.3; python_version>="3.9"', - 'numpy>=1.21.2; python_version>="3.10"', - 'numpy>=1.19.3; python_version>="3.6" and platform_system=="Linux" and platform_machine=="aarch64"', - 'numpy>=1.21.0; python_version<="3.9" and platform_system=="Darwin" and platform_machine=="arm64"', - 'numpy>=1.21.4; python_version>="3.10" and platform_system=="Darwin"', - "numpy>=1.23.5; python_version>='3.11'", - "numpy>=1.26.0; python_version>='3.12'" + 'numpy<2.0; python_version<"3.9"', + 'numpy(>=2, <2.3.0); python_version>="3.9"', ] python_version = cmaker.CMaker.get_python_version() From 609ff9b9a8166476baf596fd4c3f976ca7d2f30f Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Tue, 8 Jul 2025 11:17:57 +0300 Subject: [PATCH 7/7] Disabled Orbbec backend on Windows in headless configuration as it uses MSMF API too. --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 89412187..7c470824 100755 --- a/setup.py +++ b/setup.py @@ -214,10 +214,10 @@ def main(): cmake_args.append("-DWITH_WIN32UI=OFF") cmake_args.append("-DWITH_QT=OFF") cmake_args.append("-DWITH_GTK=OFF") - if is_CI_build: - cmake_args.append( - "-DWITH_MSMF=OFF" - ) # see: https://github.com/skvark/opencv-python/issues/263 + # see: https://github.com/skvark/opencv-python/issues/263 + # see: https://github.com/opencv/opencv-python/issues/771 + cmake_args.append("-DWITH_MSMF=OFF") + cmake_args.append("-DWITH_OBSENSOR=OFF") # Orbbec cameras backend uses MSMF API if sys.platform.startswith("linux") and not is64 and "bdist_wheel" in sys.argv: subprocess.check_call("patch -p0 < patches/patchOpenEXR", shell=True)