From 44939451722fd28f4ecd874d306dc0cd71d15517 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Thu, 12 Oct 2023 11:57:06 +0300 Subject: [PATCH 01/22] Docker images update for Python 3.12 and security fixes. --- .github/workflows/build_wheels_linux.yml | 4 ++-- .github/workflows/build_wheels_linux_arm.yml | 2 +- docker/manylinux2014/Dockerfile_aarch64 | 11 ++++++----- docker/manylinux2014/Dockerfile_x86_64 | 6 +++--- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index 3176df1a..0bfb6ba3 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:20230628 + DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20231006 USE_CCACHE: 0 UNICODE_WIDTH: 32 PLAT: x86_64 @@ -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:20230628 + DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20231006 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 5a9de23f..0db992cc 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:20230628 + DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20231006 USE_CCACHE: 0 UNICODE_WIDTH: 32 SDIST: ${{ matrix.build_sdist || 0 }} diff --git a/docker/manylinux2014/Dockerfile_aarch64 b/docker/manylinux2014/Dockerfile_aarch64 index 26c45e80..dc4909f3 100644 --- a/docker/manylinux2014/Dockerfile_aarch64 +++ b/docker/manylinux2014/Dockerfile_aarch64 @@ -1,14 +1,14 @@ -# Version: 20230628 +# Version: 20231006 # 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.3 -ARG FREETYPE_VERSION=2.13.1 +ARG FREETYPE_VERSION=2.13.2 ARG LIBPNG_VERSION=1.6.40 ARG NASM_VERSION=2.15.04 -ARG OPENSSL_VERSION=1_1_1u +ARG OPENSSL_VERSION=1_1_1w ARG QT_VERSION=5.15.0 ARG YASM_VERSION=1.3.0 @@ -33,9 +33,10 @@ RUN mkdir ~/libpng_sources && \ cd .. && \ rm -rf ~/libpng_sources +# looks like download.savannah.gnu.org suffers from https://savannah.gnu.org/bugs/?48150 in Manylinux 2014 env on aarch64 RUN mkdir ~/freetype_sources && \ cd ~/freetype_sources && \ - curl -O -L https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \ + curl -O -L https://download-mirror.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \ tar -xf freetype-${FREETYPE_VERSION}.tar.gz && \ cd freetype-${FREETYPE_VERSION} && \ ./configure --prefix="/ffmpeg_build" --enable-freetype-config && \ @@ -44,7 +45,7 @@ RUN mkdir ~/freetype_sources && \ cd .. && \ rm -rf ~/freetype_sources -RUN curl -O -L https://download.qt.io/official_releases/qt/5.15/${QT_VERSION}/single/qt-everywhere-src-${QT_VERSION}.tar.xz && \ +RUN curl -C - -O -L https://download.qt.io/official_releases/qt/5.15/${QT_VERSION}/single/qt-everywhere-src-${QT_VERSION}.tar.xz && \ tar -xf qt-everywhere-src-${QT_VERSION}.tar.xz && \ cd qt-everywhere-src-${QT_VERSION} && \ export MAKEFLAGS=-j$(nproc) && \ diff --git a/docker/manylinux2014/Dockerfile_x86_64 b/docker/manylinux2014/Dockerfile_x86_64 index d34f19f5..9fd6f0fb 100644 --- a/docker/manylinux2014/Dockerfile_x86_64 +++ b/docker/manylinux2014/Dockerfile_x86_64 @@ -1,14 +1,14 @@ -# Version: 20230628 +# Version: 20231006 # 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.3 -ARG FREETYPE_VERSION=2.13.1 +ARG FREETYPE_VERSION=2.13.2 ARG LIBPNG_VERSION=1.6.40 ARG NASM_VERSION=2.15.04 -ARG OPENSSL_VERSION=1_1_1u +ARG OPENSSL_VERSION=1_1_1w ARG QT_VERSION=5.15.0 ARG YASM_VERSION=1.3.0 From c9145d909193ad3b06b5d300be1e97bd7bb34acf Mon Sep 17 00:00:00 2001 From: Dmitry Kurtaev Date: Wed, 18 Oct 2023 15:32:00 +0300 Subject: [PATCH 02/22] Update downloads badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 771fa3dc..0984e421 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Downloads](http://pepy.tech/badge/opencv-python)](http://pepy.tech/project/opencv-python) +[![Downloads](https://static.pepy.tech/badge/opencv-python)](http://pepy.tech/project/opencv-python) - [OpenCV on Wheels](#opencv-on-wheels) - [Installation and Usage](#installation-and-usage) From 98573cebac8fd08b55d95041fcd9bb77fbe621ce Mon Sep 17 00:00:00 2001 From: Dmitry Kurtaev Date: Sat, 9 Dec 2023 10:55:25 +0300 Subject: [PATCH 03/22] Change setup.py to trigger GitHub show dependents --- setup.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index f6056969..78998a03 100644 --- a/setup.py +++ b/setup.py @@ -7,8 +7,7 @@ import re import sysconfig import platform -import skbuild -from skbuild import cmaker +from skbuild import cmaker, setup def main(): @@ -264,7 +263,7 @@ def main(): rearrange_cmake_output_data, files_outside_package_dir, package_data.keys() ) - skbuild.setup( + setup( name=package_name, version=package_version, url="https://github.com/opencv/opencv-python", From 0da732e80d492c61170ee43ea76c74bf265bce24 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Tue, 3 Oct 2023 13:41:12 +0300 Subject: [PATCH 04/22] Python 3.12 support. --- .github/workflows/build_wheels_linux.yml | 6 +++--- .github/workflows/build_wheels_linux_arm.yml | 8 ++++---- .github/workflows/build_wheels_macos.yml | 6 +++--- .github/workflows/build_wheels_macos_m1.yml | 2 +- .github/workflows/build_wheels_windows.yml | 2 +- docker/manylinux2014/Dockerfile_x86_64 | 2 +- multibuild | 2 +- setup.py | 4 +++- 8 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index 0bfb6ba3..b880c1f7 100644 --- a/.github/workflows/build_wheels_linux.yml +++ b/.github/workflows/build_wheels_linux.yml @@ -84,7 +84,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] platform: [x64] with_contrib: [0, 1] without_gui: [0, 1] @@ -93,7 +93,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==1.24.0 + NP_TEST_DEP_LATEST: numpy==1.26.0 CONFIG_PATH: travis_config.sh PLAT: x86_64 steps: @@ -106,7 +106,7 @@ jobs: submodules: true fetch-depth: 0 - name: Setup Environment variables - run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ 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 + 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 uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/build_wheels_linux_arm.yml b/.github/workflows/build_wheels_linux_arm.yml index 0db992cc..7edb0c91 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:20231006 + DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20231109 USE_CCACHE: 0 UNICODE_WIDTH: 32 SDIST: ${{ matrix.build_sdist || 0 }} @@ -84,7 +84,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] platform: [x64] with_contrib: [0, 1] without_gui: [0, 1] @@ -94,7 +94,7 @@ jobs: MB_PYTHON_VERSION: ${{ matrix.python-version }} PLAT: aarch64 NP_TEST_DEP: numpy==1.19.4 - NP_TEST_DEP_LATEST: numpy==1.24.0 + NP_TEST_DEP_LATEST: numpy==1.26.0 CONFIG_PATH: travis_config.sh DOCKER_TEST_IMAGE: multibuild/focal_arm64v8 UNICODE_WIDTH: 32 @@ -108,7 +108,7 @@ jobs: submodules: true fetch-depth: 0 - name: Setup Environment variables - run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ 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 + 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 uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/build_wheels_macos.yml b/.github/workflows/build_wheels_macos.yml index 1defd1e5..d40c4697 100644 --- a/.github/workflows/build_wheels_macos.yml +++ b/.github/workflows/build_wheels_macos.yml @@ -105,7 +105,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] platform: [x64] with_contrib: [0, 1] without_gui: [0, 1] @@ -114,7 +114,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==1.24.0 + NP_TEST_DEP_LATEST: numpy==1.26.0 CONFIG_PATH: travis_config.sh PLAT: x86_64 OPENCV_TEST_DATA_PATH: ${{ github.workspace }}/opencv_extra/testdata @@ -134,7 +134,7 @@ jobs: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.platform }} - name: Setup Environment variables - run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ 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 + 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 uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/build_wheels_macos_m1.yml b/.github/workflows/build_wheels_macos_m1.yml index 2aed7d4b..5d638fd8 100644 --- a/.github/workflows/build_wheels_macos_m1.yml +++ b/.github/workflows/build_wheels_macos_m1.yml @@ -75,7 +75,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] platform: [x64] with_contrib: [0, 1] without_gui: [0, 1] diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index b1a98d26..19470a5d 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -89,7 +89,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] platform: [x86, x64] with_contrib: [0, 1] without_gui: [0, 1] diff --git a/docker/manylinux2014/Dockerfile_x86_64 b/docker/manylinux2014/Dockerfile_x86_64 index 9fd6f0fb..9233bffa 100644 --- a/docker/manylinux2014/Dockerfile_x86_64 +++ b/docker/manylinux2014/Dockerfile_x86_64 @@ -1,4 +1,4 @@ -# Version: 20231006 +# Version: 20231109 # Image name: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64 FROM quay.io/pypa/manylinux2014_x86_64:latest diff --git a/multibuild b/multibuild index 15fd8770..0714f52e 160000 --- a/multibuild +++ b/multibuild @@ -1 +1 @@ -Subproject commit 15fd8770abe6b12e94c2362ae8f21cd876bd998e +Subproject commit 0714f52ea1ea57a0bc33c7f8b74bae457e1fa8e0 diff --git a/setup.py b/setup.py index f6056969..d8e3c920 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,8 @@ def main(): '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.23.5; python_version>='3.11'", + "numpy>=1.26.0; python_version>='3.12'" ] python_version = cmaker.CMaker.get_python_version() @@ -299,6 +300,7 @@ def main(): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: C++", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Scientific/Engineering", From 984ff7378a3132c35cc52f24645c31f6cd00cac0 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Thu, 21 Dec 2023 13:17:01 +0300 Subject: [PATCH 05/22] Include Intel IPP license text to 3rd party licenses list. --- LICENSE-3RD-PARTY.txt | 78 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/LICENSE-3RD-PARTY.txt b/LICENSE-3RD-PARTY.txt index e64ea511..f7d91a4f 100644 --- a/LICENSE-3RD-PARTY.txt +++ b/LICENSE-3RD-PARTY.txt @@ -2985,3 +2985,81 @@ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +Intel(R) IPP ICV library statically linked within x86 and x86_64 opencv-python packages. + +Intel(R) Integrated Performance Primitives 2021 Update 10 + +Intel Simplified Software License (Version October 2022) + +Intel(R) Integrated Performance Primitives (Intel(R) IPP) : Copyright (C) 1997 Intel Corporation + +Use and Redistribution. You may use and redistribute the software, which is +provided in binary form only, (the "Software"), without modification, +provided the following conditions are met: + +* Redistributions must reproduce the above copyright notice and these + terms of use in the Software and in the documentation and/or other materials + provided with the distribution. +* Neither the name of Intel nor the names of its suppliers may be used to + endorse or promote products derived from this Software without specific + prior written permission. +* No reverse engineering, decompilation, or disassembly of the Software is + permitted, nor any modification or alteration of the Software or its operation + at any time, including during execution. + +No other licenses. Except as provided in the preceding section, Intel grants no +licenses or other rights by implication, estoppel or otherwise to, patent, +copyright, trademark, trade name, service mark or other intellectual property +licenses or rights of Intel. + +Third party software. "Third Party Software" means the files (if any) listed +in the "third-party-software.txt" or other similarly-named text file that may +be included with the Software. Third Party Software, even if included with the +distribution of the Software, may be governed by separate license terms, including +without limitation, third party license terms, open source software notices and +terms, and/or other Intel software license terms. These separate license terms +solely govern Your use of the Third Party Software. + +DISCLAIMER. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT ARE +DISCLAIMED. THIS SOFTWARE IS NOT INTENDED FOR USE IN SYSTEMS OR APPLICATIONS +WHERE FAILURE OF THE SOFTWARE MAY CAUSE PERSONAL INJURY OR DEATH AND YOU AGREE +THAT YOU ARE FULLY RESPONSIBLE FOR ANY CLAIMS, COSTS, DAMAGES, EXPENSES, AND +ATTORNEYS' FEES ARISING OUT OF ANY SUCH USE, EVEN IF ANY CLAIM ALLEGES THAT +INTEL WAS NEGLIGENT REGARDING THE DESIGN OR MANUFACTURE OF THE SOFTWARE. + +LIMITATION OF LIABILITY. IN NO EVENT WILL INTEL BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +No support. Intel may make changes to the Software, at any time without notice, +and is not obligated to support, update or provide training for the Software. + +Termination. Your right to use the Software is terminated in the event of your +breach of this license. + +Feedback. Should you provide Intel with comments, modifications, corrections, +enhancements or other input ("Feedback") related to the Software, Intel will be +free to use, disclose, reproduce, license or otherwise distribute or exploit the +Feedback in its sole discretion without any obligations or restrictions of any +kind, including without limitation, intellectual property rights or licensing +obligations. + +Compliance with laws. You agree to comply with all relevant laws and regulations +governing your use, transfer, import or export (or prohibition thereof) of the +Software. + +Governing law. All disputes will be governed by the laws of the United States of +America and the State of Delaware without reference to conflict of law +principles and subject to the exclusive jurisdiction of the state or federal +courts sitting in the State of Delaware, and each party agrees that it submits +to the personal jurisdiction and venue of those courts and waives any +objections. THE UNITED NATIONS CONVENTION ON CONTRACTS FOR THE INTERNATIONAL +SALE OF GOODS (1980) IS SPECIFICALLY EXCLUDED AND WILL NOT APPLY TO THE SOFTWARE. From f5c47b367e3f0e3d1546c8192aae21c6ae52a73d Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Mon, 25 Dec 2023 16:18:41 +0300 Subject: [PATCH 06/22] Linux environment update for release 4.9.0 Fixes https://github.com/opencv/opencv-python/issues/926 - FFmpeg update to 5.1.4. - Stick to lates vpx release 1.13.1 with security fixes. --- .github/workflows/build_wheels_linux.yml | 4 ++-- .github/workflows/build_wheels_linux_arm.yml | 2 +- docker/manylinux2014/Dockerfile_aarch64 | 7 ++++--- docker/manylinux2014/Dockerfile_i686 | 4 ++-- docker/manylinux2014/Dockerfile_x86_64 | 7 ++++--- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index b880c1f7..45a38d06 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:20231006 + DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20231225 USE_CCACHE: 0 UNICODE_WIDTH: 32 PLAT: x86_64 @@ -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:20231006 + DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20231225 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 7edb0c91..6371e360 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:20231109 + DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20231225 USE_CCACHE: 0 UNICODE_WIDTH: 32 SDIST: ${{ matrix.build_sdist || 0 }} diff --git a/docker/manylinux2014/Dockerfile_aarch64 b/docker/manylinux2014/Dockerfile_aarch64 index dc4909f3..196c97bb 100644 --- a/docker/manylinux2014/Dockerfile_aarch64 +++ b/docker/manylinux2014/Dockerfile_aarch64 @@ -1,12 +1,13 @@ -# Version: 20231006 +# Version: 20231225 # 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.3 +ARG FFMPEG_VERSION=5.1.4 ARG FREETYPE_VERSION=2.13.2 ARG LIBPNG_VERSION=1.6.40 +ARG VPX_VERSION=v1.13.1 ARG NASM_VERSION=2.15.04 ARG OPENSSL_VERSION=1_1_1w ARG QT_VERSION=5.15.0 @@ -93,7 +94,7 @@ RUN mkdir ~/yasm_sources && \ RUN mkdir ~/libvpx_sources && \ cd ~/libvpx_sources && \ - git clone --depth 1 https://github.com/webmproject/libvpx.git && \ + git clone --depth 1 -b ${VPX_VERSION} https://github.com/webmproject/libvpx.git && \ cd libvpx && \ ./configure --prefix="/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm --enable-pic --enable-shared && \ make -j$(getconf _NPROCESSORS_ONLN) && \ diff --git a/docker/manylinux2014/Dockerfile_i686 b/docker/manylinux2014/Dockerfile_i686 index c11f6a4d..1c94b1fc 100644 --- a/docker/manylinux2014/Dockerfile_i686 +++ b/docker/manylinux2014/Dockerfile_i686 @@ -2,9 +2,9 @@ FROM quay.io/pypa/manylinux2014_i686:latest ARG CCACHE_VERSION=3.7.9 ARG CMAKE_VERSION=3.17.0 -ARG FFMPEG_VERSION=5.1.2 +ARG FFMPEG_VERSION=5.1.4 ARG NASM_VERSION=2.15.04 -ARG OPENSSL_VERSION=1_1_1s +ARG OPENSSL_VERSION=1_1_1w ARG QT_VERSION=5.15.0 ARG YASM_VERSION=1.3.0 diff --git a/docker/manylinux2014/Dockerfile_x86_64 b/docker/manylinux2014/Dockerfile_x86_64 index 9233bffa..ac28b689 100644 --- a/docker/manylinux2014/Dockerfile_x86_64 +++ b/docker/manylinux2014/Dockerfile_x86_64 @@ -1,12 +1,13 @@ -# Version: 20231109 +# Version: 20231225 # 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.3 +ARG FFMPEG_VERSION=5.1.4 ARG FREETYPE_VERSION=2.13.2 ARG LIBPNG_VERSION=1.6.40 +ARG VPX_VERSION=v1.13.1 ARG NASM_VERSION=2.15.04 ARG OPENSSL_VERSION=1_1_1w ARG QT_VERSION=5.15.0 @@ -92,7 +93,7 @@ RUN mkdir ~/yasm_sources && \ RUN mkdir ~/libvpx_sources && \ cd ~/libvpx_sources && \ - git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git && \ + git clone --depth 1 -b ${VPX_VERSION} https://chromium.googlesource.com/webm/libvpx.git && \ cd libvpx && \ ./configure --prefix="/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm --enable-pic --enable-shared && \ make -j$(getconf _NPROCESSORS_ONLN) && \ From e7a86f982713d565c211f6059d52d5f200d97813 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Tue, 26 Dec 2023 18:44:55 +0300 Subject: [PATCH 07/22] Use native Mac M1 Github Runner for the configuration. --- .github/workflows/build_wheels_macos_m1.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_wheels_macos_m1.yml b/.github/workflows/build_wheels_macos_m1.yml index 5d638fd8..85f42fb9 100644 --- a/.github/workflows/build_wheels_macos_m1.yml +++ b/.github/workflows/build_wheels_macos_m1.yml @@ -55,8 +55,8 @@ jobs: echo $ENABLE_CONTRIB > contrib.enabled echo $ENABLE_HEADLESS > headless.enabled export MACOSX_DEPLOYMENT_TARGET=11.0 - arch -arm64 python${{ matrix.python-version }} -m pip install toml && python${{ matrix.python-version }} -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | python${{ matrix.python-version }} -m pip install -r /dev/stdin - arch -arm64 python${{ matrix.python-version }} setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=wheelhouse -v + python${{ matrix.python-version }} -m pip install toml && python${{ matrix.python-version }} -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | python${{ matrix.python-version }} -m pip install -r /dev/stdin + python${{ matrix.python-version }} setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=wheelhouse -v delocate-wheel ${{ github.workspace }}/wheelhouse/opencv* - name: Saving all wheels uses: actions/upload-artifact@v3 @@ -100,18 +100,18 @@ jobs: path: wheelhouse/ - name: Package installation run: | - arch -arm64 python${{ matrix.python-version }} -m pip install --user --no-cache --force-reinstall wheelhouse/opencv*.whl + python${{ matrix.python-version }} -m pip install --user --no-cache --force-reinstall wheelhouse/opencv*.whl cd ${{ github.workspace }}/tests - arch -arm64 python${{ matrix.python-version }} get_build_info.py + python${{ matrix.python-version }} get_build_info.py - name: Run tests run: | cd ${{ github.workspace }}/opencv - arch -arm64 python${{ matrix.python-version }} modules/python/test/test.py -v --repo . + python${{ matrix.python-version }} modules/python/test/test.py -v --repo . - name: Pylint test run: | - arch -arm64 python${{ matrix.python-version }} -m pip install pylint==2.15.9 + python${{ matrix.python-version }} -m pip install pylint==2.15.9 cd ${{ github.workspace }}/tests - arch -arm64 python${{ matrix.python-version }} -m pylint $PYLINT_TEST_FILE + python${{ matrix.python-version }} -m pylint $PYLINT_TEST_FILE Release_rolling: if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} From 1e1b0ca86ffcbeb9261378707279c4a116381f3b Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Tue, 26 Dec 2023 21:23:09 +0300 Subject: [PATCH 08/22] Migrate Mac OS Intel to OSX 12. --- .github/workflows/build_wheels_macos.yml | 4 ++-- travis_osx_brew_cache.sh | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build_wheels_macos.yml b/.github/workflows/build_wheels_macos.yml index d40c4697..dd3bc654 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-11 + runs-on: macos-12 defaults: run: shell: bash @@ -98,7 +98,7 @@ jobs: Test: needs: [Build] - runs-on: macos-11 + runs-on: macos-12 defaults: run: shell: bash diff --git a/travis_osx_brew_cache.sh b/travis_osx_brew_cache.sh index 1a2a1c6c..42e71446 100644 --- a/travis_osx_brew_cache.sh +++ b/travis_osx_brew_cache.sh @@ -265,14 +265,14 @@ function _brew_parse_bottle_json { local JSON; JSON="${1:?}"; shift - local JSON_DATA; JSON_DATA=$(python2.7 -c 'if True: + local JSON_DATA; JSON_DATA=$(python3 -c 'if True: import sys,json; j=json.load(open(sys.argv[1],"rb")); [name]=j.keys(); [pdata]=j.values() - print name - print pdata["formula"]["pkg_version"] - print pdata["bottle"]["rebuild"] + print(name) + print(pdata["formula"]["pkg_version"]) + print(pdata["bottle"]["rebuild"]) [(tag_name, tag_dict)]=pdata["bottle"]["tags"].items() - print tag_name - print tag_dict["sha256"] + print(tag_name) + print(tag_dict["sha256"]) ' "$JSON") unset JSON @@ -292,15 +292,15 @@ function _brew_parse_package_info { PACKAGE="${1:?}"; shift OS_CODENAME="${1:?}"; shift - local JSON_DATA; JSON_DATA=$(python2.7 -c 'if True: + local JSON_DATA; JSON_DATA=$(python3 -c 'if True: import sys, json, subprocess; j=json.loads(subprocess.check_output(("brew","info","--json=v1",sys.argv[1]))) data=j[0] revision=data["revision"] # in bottle''s json, revision is included into version; here, they are separate - print data["versions"]["stable"]+("_"+str(revision) if revision else "") + print(data["versions"]["stable"]+("_"+str(revision) if revision else "")) bottle_data=data["bottle"].get("stable",{"rebuild":"","files":{}}) - print bottle_data["rebuild"] - print bottle_data["files"].get(sys.argv[2],{"sha256":"!?"})["sha256"] #prevent losing trailing blank line to command substitution + print(bottle_data["rebuild"]) + print(bottle_data["files"].get(sys.argv[2],{"sha256":"!?"})["sha256"]) #prevent losing trailing blank line to command substitution ' \ "$PACKAGE" "$OS_CODENAME"); JSON_DATA="${JSON_DATA%\!\?}" #!? can't occur in a hash From 042e0e04a5e39ddfc6582d13787269916a3f4c06 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Wed, 27 Dec 2023 13:35:35 +0300 Subject: [PATCH 09/22] Submodules update to tag 4.9.0. --- opencv | 2 +- opencv_contrib | 2 +- opencv_extra | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opencv b/opencv index 51998500..dad8af6b 160000 --- a/opencv +++ b/opencv @@ -1 +1 @@ -Subproject commit 5199850039ad23f1f0e6cccea5061a9fea5efca6 +Subproject commit dad8af6b17f8e60d7b95a1203a1b4d22f56574cf diff --git a/opencv_contrib b/opencv_contrib index f10c84d4..c7602a8f 160000 --- a/opencv_contrib +++ b/opencv_contrib @@ -1 +1 @@ -Subproject commit f10c84d48b0714f2b408c9e5cccfac1277c8e6cc +Subproject commit c7602a8f74205e44389bd6a4e8d727d32e7e27b4 diff --git a/opencv_extra b/opencv_extra index fdd66bfc..7f0ba7ad 160000 --- a/opencv_extra +++ b/opencv_extra @@ -1 +1 @@ -Subproject commit fdd66bfcc3ced243d682fe03f0858bf43867656c +Subproject commit 7f0ba7adefcbbbe3df7d939f5246ba0382c7c629 From eaa9512a04c8f1c1f7aeb9f093fa948d3542561b Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Fri, 29 Dec 2023 13:53:52 +0300 Subject: [PATCH 10/22] Added donation notification. --- README.md | 4 ++++ setup.py | 1 + 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 0984e421..514143c6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ [![Downloads](https://static.pepy.tech/badge/opencv-python)](http://pepy.tech/project/opencv-python) +### Keep OpenCV Free + +OpenCV is raising funds to keep the library free for everyone, and we need the support of the entire community to do it. [Donate to OpenCV on IndieGoGo](http://igg.me/at/opencv5) to show your support. + - [OpenCV on Wheels](#opencv-on-wheels) - [Installation and Usage](#installation-and-usage) - [Frequently Asked Questions](#frequently-asked-questions) diff --git a/setup.py b/setup.py index 907e3329..766b4bb4 100644 --- a/setup.py +++ b/setup.py @@ -310,6 +310,7 @@ def main(): cmake_source_dir=cmake_source_dir, ) + print("OpenCV is raising funds to keep the library free for everyone, and we need the support of the entire community to do it. Donate to OpenCV on IndieGoGo:\nhttps://www.indiegogo.com/projects/opencv-5-support-non-profit-open-source-cv-ai#/") class RearrangeCMakeOutput: """ From 080da76b1534607cb648b07a6dd5df30beb61f8d Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Fri, 29 Dec 2023 14:03:50 +0300 Subject: [PATCH 11/22] Run Python test on Mac M1 in virtual environment to prevent "error: externally-managed-environment". --- .github/workflows/build_wheels_macos_m1.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_macos_m1.yml b/.github/workflows/build_wheels_macos_m1.yml index 85f42fb9..4f1f214c 100644 --- a/.github/workflows/build_wheels_macos_m1.yml +++ b/.github/workflows/build_wheels_macos_m1.yml @@ -98,17 +98,24 @@ jobs: with: name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }} path: wheelhouse/ + - name: Create Venv for test + run: | + test -d "${{ github.workspace }}/opencv_test" && rm -rf "${{ github.workspace }}/opencv_test" + python${{ matrix.python-version }} -m venv ${{ github.workspace }}/opencv_test - name: Package installation run: | - python${{ matrix.python-version }} -m pip install --user --no-cache --force-reinstall wheelhouse/opencv*.whl + source ${{ github.workspace }}/opencv_test/bin/activate + python${{ matrix.python-version }} -m pip install --no-cache --force-reinstall wheelhouse/opencv*.whl cd ${{ github.workspace }}/tests python${{ matrix.python-version }} get_build_info.py - name: Run tests run: | + source ${{ github.workspace }}/opencv_test/bin/activate cd ${{ github.workspace }}/opencv python${{ matrix.python-version }} modules/python/test/test.py -v --repo . - name: Pylint test run: | + source ${{ github.workspace }}/opencv_test/bin/activate python${{ matrix.python-version }} -m pip install pylint==2.15.9 cd ${{ github.workspace }}/tests python${{ matrix.python-version }} -m pylint $PYLINT_TEST_FILE From 949b65ea40f5141bdf46f738f7751a16d6309e04 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Sat, 30 Dec 2023 13:13:41 +0300 Subject: [PATCH 12/22] Upgrade pip on Mac M1 before package installation. --- .github/workflows/build_wheels_macos_m1.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_wheels_macos_m1.yml b/.github/workflows/build_wheels_macos_m1.yml index 4f1f214c..f0e41d3a 100644 --- a/.github/workflows/build_wheels_macos_m1.yml +++ b/.github/workflows/build_wheels_macos_m1.yml @@ -105,6 +105,7 @@ jobs: - name: Package installation run: | source ${{ github.workspace }}/opencv_test/bin/activate + python${{ matrix.python-version }} -m pip install --upgrade pip python${{ matrix.python-version }} -m pip install --no-cache --force-reinstall wheelhouse/opencv*.whl cd ${{ github.workspace }}/tests python${{ matrix.python-version }} get_build_info.py From fcf02c69070c7b6ee58ceef00e6a54ca8f0e1bc0 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Sun, 31 Dec 2023 11:09:48 +0300 Subject: [PATCH 13/22] Readme update for 4.9.0. --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 514143c6..7f1e3a4c 100644 --- a/README.md +++ b/README.md @@ -241,6 +241,7 @@ Python 3.x compatible pre-built wheels are provided for the officially supported - 3.9 - 3.10 - 3.11 +- 3.12 ### Backward compatibility @@ -249,3 +250,5 @@ Starting from 4.2.0 and 3.4.9 builds the macOS Travis build environment was upda Starting from 4.3.0 and 3.4.10 builds the Linux build environment was updated from `manylinux1` to `manylinux2014`. This dropped support for old Linux distributions. Starting from version 4.7.0 the Mac OS GitHub Actions build environment was update to version 11. Mac OS 10.x support depricated. See https://github.com/actions/runner-images/issues/5583 + +Starting from version 4.9.0 the Mac OS GitHub Actions build environment was update to version 12. Mac OS 10.x support depricated by Brew and most of used packages. From ebd0aee2004dc4e53a2c8b8b70231c718b313769 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Tue, 21 May 2024 09:49:15 +0300 Subject: [PATCH 14/22] Use Github sponsor link. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f1e3a4c..aa19f439 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ### Keep OpenCV Free -OpenCV is raising funds to keep the library free for everyone, and we need the support of the entire community to do it. [Donate to OpenCV on IndieGoGo](http://igg.me/at/opencv5) to show your support. +OpenCV is raising funds to keep the library free for everyone, and we need the support of the entire community to do it. [Donate to OpenCV on Github](https://github.com/sponsors/opencv) to show your support. - [OpenCV on Wheels](#opencv-on-wheels) - [Installation and Usage](#installation-and-usage) From 542cf06b308cdcf3d5e0a32e33482fe6b22997d6 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov <2536374+asmorkalov@users.noreply.github.com> Date: Thu, 30 May 2024 15:46:29 +0300 Subject: [PATCH 15/22] Dependencies update for 4.10.0 release. (#984) * Dependences update for 4.10 release. * Updated docker tags. * New docker tags in pipelines. * Fixed Qt version. * Added QT to LD_LIBRARY_PATH --- .github/workflows/build_wheels_linux.yml | 4 ++-- .github/workflows/build_wheels_linux_arm.yml | 2 +- docker/manylinux2014/Dockerfile_aarch64 | 12 ++++++------ docker/manylinux2014/Dockerfile_x86_64 | 12 ++++++------ patches/patchQtPlugins | 2 +- travis_config.sh | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index 45a38d06..0e202f63 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:20231225 + DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20240524 USE_CCACHE: 0 UNICODE_WIDTH: 32 PLAT: x86_64 @@ -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:20231225 + DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20240524 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 6371e360..4c1fc48e 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:20231225 + DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20240524 USE_CCACHE: 0 UNICODE_WIDTH: 32 SDIST: ${{ matrix.build_sdist || 0 }} diff --git a/docker/manylinux2014/Dockerfile_aarch64 b/docker/manylinux2014/Dockerfile_aarch64 index 196c97bb..e19492ff 100644 --- a/docker/manylinux2014/Dockerfile_aarch64 +++ b/docker/manylinux2014/Dockerfile_aarch64 @@ -1,4 +1,4 @@ -# Version: 20231225 +# Version: 20240524 # Image name: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64 FROM quay.io/pypa/manylinux2014_aarch64:latest @@ -6,11 +6,11 @@ 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.40 -ARG VPX_VERSION=v1.13.1 +ARG LIBPNG_VERSION=1.6.43 +ARG VPX_VERSION=v1.14.0 ARG NASM_VERSION=2.15.04 ARG OPENSSL_VERSION=1_1_1w -ARG QT_VERSION=5.15.0 +ARG QT_VERSION=5.15.13 ARG YASM_VERSION=1.3.0 ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH @@ -46,8 +46,8 @@ RUN mkdir ~/freetype_sources && \ cd .. && \ rm -rf ~/freetype_sources -RUN curl -C - -O -L https://download.qt.io/official_releases/qt/5.15/${QT_VERSION}/single/qt-everywhere-src-${QT_VERSION}.tar.xz && \ - tar -xf qt-everywhere-src-${QT_VERSION}.tar.xz && \ +RUN curl -C - -O -L https://download.qt.io/archive/qt/5.15/${QT_VERSION}/single/qt-everywhere-opensource-src-${QT_VERSION}.tar.xz && \ + tar -xf qt-everywhere-opensource-src-${QT_VERSION}.tar.xz && \ cd qt-everywhere-src-${QT_VERSION} && \ export MAKEFLAGS=-j$(nproc) && \ ./configure -prefix /opt/Qt${QT_VERSION} -release -opensource -confirm-license -qtnamespace QtOpenCVPython -xcb -xcb-xlib -bundled-xcb-xinput -no-openssl -no-dbus -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmultimedia -skip qtpurchasing -skip qtqa -skip qtremoteobjects -skip qtrepotools -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttranslations -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip xmlpatterns -skip declarative -make libs && \ diff --git a/docker/manylinux2014/Dockerfile_x86_64 b/docker/manylinux2014/Dockerfile_x86_64 index ac28b689..eceae25e 100644 --- a/docker/manylinux2014/Dockerfile_x86_64 +++ b/docker/manylinux2014/Dockerfile_x86_64 @@ -1,4 +1,4 @@ -# Version: 20231225 +# Version: 20240524 # Image name: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64 FROM quay.io/pypa/manylinux2014_x86_64:latest @@ -6,11 +6,11 @@ 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.40 -ARG VPX_VERSION=v1.13.1 +ARG LIBPNG_VERSION=1.6.43 +ARG VPX_VERSION=v1.14.0 ARG NASM_VERSION=2.15.04 ARG OPENSSL_VERSION=1_1_1w -ARG QT_VERSION=5.15.0 +ARG QT_VERSION=5.15.13 ARG YASM_VERSION=1.3.0 ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH @@ -45,8 +45,8 @@ RUN mkdir ~/freetype_sources && \ cd .. && \ rm -rf ~/freetype_sources -RUN curl -O -L https://download.qt.io/official_releases/qt/5.15/${QT_VERSION}/single/qt-everywhere-src-${QT_VERSION}.tar.xz && \ - tar -xf qt-everywhere-src-${QT_VERSION}.tar.xz && \ +RUN curl -O -L https://download.qt.io/archive/qt/5.15/${QT_VERSION}/single/qt-everywhere-opensource-src-${QT_VERSION}.tar.xz && \ + tar -xf qt-everywhere-opensource-src-${QT_VERSION}.tar.xz && \ cd qt-everywhere-src-${QT_VERSION} && \ export MAKEFLAGS=-j$(nproc) && \ ./configure -prefix /opt/Qt${QT_VERSION} -release -opensource -confirm-license -qtnamespace QtOpenCVPython -xcb -xcb-xlib -bundled-xcb-xinput -no-openssl -no-dbus -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmultimedia -skip qtpurchasing -skip qtqa -skip qtremoteobjects -skip qtrepotools -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttranslations -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip xmlpatterns -skip declarative -make libs && \ diff --git a/patches/patchQtPlugins b/patches/patchQtPlugins index a05a5f83..70c6975a 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.0/plugins DESTINATION lib/qt) ++ install(DIRECTORY /opt/Qt5.15.13/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 b91d63c4..903ceafb 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.0/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/Qt5.15.13/lib export MAKEFLAGS="-j$(grep -E '^processor[[:space:]]*:' /proc/cpuinfo | wc -l)" CURRENT_ARCH=$(uname -m) if [[ $CURRENT_ARCH == 'aarch64' ]]; then From d261ecbd0f4f937dc9cf99ef37be8278534e370e Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Mon, 3 Jun 2024 11:14:10 +0300 Subject: [PATCH 16/22] Added license text for OrbbecSDK needed on MacOS ARM64. --- LICENSE-3RD-PARTY.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/LICENSE-3RD-PARTY.txt b/LICENSE-3RD-PARTY.txt index f7d91a4f..0462eee3 100644 --- a/LICENSE-3RD-PARTY.txt +++ b/LICENSE-3RD-PARTY.txt @@ -3063,3 +3063,28 @@ courts sitting in the State of Delaware, and each party agrees that it submits to the personal jurisdiction and venue of those courts and waives any objections. THE UNITED NATIONS CONVENTION ON CONTRACTS FOR THE INTERNATIONAL SALE OF GOODS (1980) IS SPECIFICALLY EXCLUDED AND WILL NOT APPLY TO THE SOFTWARE. + +------------------------------------------------------------------------------ +Orbbec SDK distributed with arm64 MacOS packages. + +MIT License + +Copyright (c) 2023 OrbbecDeveloper + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 63eed93e6d372795f6b6ca3d90c5d9cefc1b5a77 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov <2536374+asmorkalov@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:28:02 +0300 Subject: [PATCH 17/22] Update submodules to 4.10.0-pre for testing. (#990) * Submodules update to tag 4.10.0. * Update donation link. * Use 4 digits in OpenCV version since 4.10.0 * Add OrbbecSDK library to package for MacOS ARM. It's aways enabled during library build. --- opencv | 2 +- opencv_contrib | 2 +- opencv_extra | 2 +- setup.py | 10 ++++++++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/opencv b/opencv index dad8af6b..71d3237a 160000 --- a/opencv +++ b/opencv @@ -1 +1 @@ -Subproject commit dad8af6b17f8e60d7b95a1203a1b4d22f56574cf +Subproject commit 71d3237a093b60a27601c20e9ee6c3e52154e8b1 diff --git a/opencv_contrib b/opencv_contrib index c7602a8f..1ed3dd2c 160000 --- a/opencv_contrib +++ b/opencv_contrib @@ -1 +1 @@ -Subproject commit c7602a8f74205e44389bd6a4e8d727d32e7e27b4 +Subproject commit 1ed3dd2c53888e3289afdb22ec4e9ebbff3dba87 diff --git a/opencv_extra b/opencv_extra index 7f0ba7ad..dd1fbd07 160000 --- a/opencv_extra +++ b/opencv_extra @@ -1 +1 @@ -Subproject commit 7f0ba7adefcbbbe3df7d939f5246ba0382c7c629 +Subproject commit dd1fbd0717ef4d83f86899b4144fdd9bc0364a5f diff --git a/setup.py b/setup.py index 766b4bb4..48d5a65f 100644 --- a/setup.py +++ b/setup.py @@ -110,11 +110,17 @@ def main(): # Path regexes with forward slashes relative to CMake install dir. rearrange_cmake_output_data = { "cv2": ( - [r"bin/opencv_videoio_ffmpeg\d{3}%s\.dll" % ("_64" if is64 else "")] + [r"bin/opencv_videoio_ffmpeg\d{4}%s\.dll" % ("_64" if is64 else "")] if os.name == "nt" else [] ) + + ( + [r"lib/libOrbbecSDK.dylib", r"lib/libOrbbecSDK.\d.\d.dylib", r"lib/libOrbbecSDK.\d.\d.\d.dylib"] + if platform.system() == "Darwin" and platform.machine() == "arm64" + else [] + ) + + # In Windows, in python/X.Y//; in Linux, in just python/X.Y/. # Naming conventions vary so widely between versions and OSes # had to give up on checking them. @@ -310,7 +316,7 @@ def main(): cmake_source_dir=cmake_source_dir, ) - print("OpenCV is raising funds to keep the library free for everyone, and we need the support of the entire community to do it. Donate to OpenCV on IndieGoGo:\nhttps://www.indiegogo.com/projects/opencv-5-support-non-profit-open-source-cv-ai#/") + print("OpenCV is raising funds to keep the library free for everyone, and we need the support of the entire community to do it. Donate to OpenCV on GitHub:\nhttps://github.com/sponsors/opencv\n") class RearrangeCMakeOutput: """ From 512209a631c9e4a3b10b17d853de31a89c449612 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Mon, 3 Jun 2024 15:38:59 +0300 Subject: [PATCH 18/22] Update Numpy requirements in the project. --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 00176366..7486f132 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,8 @@ requires = [ "numpy==1.19.3; python_version=='3.9' and platform_machine != 'aarch64' and platform_machine != 'arm64'", "numpy==1.21.2; python_version=='3.10' and platform_system!='Darwin'", "numpy==1.21.4; python_version=='3.10' and platform_system=='Darwin'", - "numpy==1.22.2; python_version>='3.11'", + "numpy==1.23.5; python_version=='3.11'", + "numpy>=1.26.4; python_version>='3.12'", "pip", "scikit-build>=0.14.0", "setuptools==59.2.0", From 00e120989b55ba1734db211766344e0237dbd477 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Mon, 17 Jun 2024 12:09:37 +0300 Subject: [PATCH 19/22] Alternative solution to use Numpy 2.0 for Python 3.9+ packages. --- .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 | 10 +++------- 6 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index 0e202f63..746395e4 100644 --- a/.github/workflows/build_wheels_linux.yml +++ b/.github/workflows/build_wheels_linux.yml @@ -27,7 +27,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7'] + python-version: ['3.9'] platform: [x64] with_contrib: [0, 1] without_gui: [0, 1] @@ -93,7 +93,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==1.26.0 + NP_TEST_DEP_LATEST: numpy==2.0.0 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 4c1fc48e..928ded7d 100644 --- a/.github/workflows/build_wheels_linux_arm.yml +++ b/.github/workflows/build_wheels_linux_arm.yml @@ -27,7 +27,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7'] + python-version: ['3.9'] platform: [x64] with_contrib: [0, 1] without_gui: [0, 1] @@ -94,7 +94,7 @@ jobs: MB_PYTHON_VERSION: ${{ matrix.python-version }} PLAT: aarch64 NP_TEST_DEP: numpy==1.19.4 - NP_TEST_DEP_LATEST: numpy==1.26.0 + NP_TEST_DEP_LATEST: numpy==2.0.0 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 dd3bc654..97df456e 100644 --- a/.github/workflows/build_wheels_macos.yml +++ b/.github/workflows/build_wheels_macos.yml @@ -27,7 +27,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7'] + python-version: ['3.9'] platform: [x64] with_contrib: [0, 1] without_gui: [0, 1] @@ -114,7 +114,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==1.26.0 + NP_TEST_DEP_LATEST: numpy==2.0.0 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 f0e41d3a..a3bcac63 100644 --- a/.github/workflows/build_wheels_macos_m1.yml +++ b/.github/workflows/build_wheels_macos_m1.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7'] + python-version: ['3.9'] platform: [x64] with_contrib: [0, 1] without_gui: [0, 1] diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 19470a5d..d69f17ec 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7'] + python-version: ['3.9'] platform: [x86, x64] with_contrib: [0, 1] without_gui: [0, 1] diff --git a/pyproject.toml b/pyproject.toml index 7486f132..71de7f9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,13 +4,9 @@ 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==1.19.3; python_version=='3.9' and platform_machine != 'aarch64' and platform_machine != 'arm64'", - "numpy==1.21.2; python_version=='3.10' and platform_system!='Darwin'", - "numpy==1.21.4; python_version=='3.10' and platform_system=='Darwin'", - "numpy==1.23.5; python_version=='3.11'", - "numpy>=1.26.4; python_version>='3.12'", + "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'", "pip", "scikit-build>=0.14.0", "setuptools==59.2.0", From c7e7a343fa14c39c4b4d9b0285e5698562ae7250 Mon Sep 17 00:00:00 2001 From: alexanderkomarovincode3 Date: Wed, 21 Aug 2024 12:01:14 +0200 Subject: [PATCH 20/22] Rename cv .github folder Add github workflow file Update gw Update gw update gw Update gw update gw Update gw update gw update gw update gw update gw update gw update gw update gw update gw update gw Update gw update gw --- .github/workflows/build.yaml | 46 +++++++++++++++++++ {.github => .github_init}/issue_template.md | 0 .../workflows/build_wheels_linux.yml | 0 .../workflows/build_wheels_linux_arm.yml | 0 .../workflows/build_wheels_macos.yml | 0 .../workflows/build_wheels_macos_m1.yml | 0 .../workflows/build_wheels_windows.yml | 0 Dockerfile.incode_build | 37 +++++++++++++++ 8 files changed, 83 insertions(+) create mode 100644 .github/workflows/build.yaml rename {.github => .github_init}/issue_template.md (100%) rename {.github => .github_init}/workflows/build_wheels_linux.yml (100%) rename {.github => .github_init}/workflows/build_wheels_linux_arm.yml (100%) rename {.github => .github_init}/workflows/build_wheels_macos.yml (100%) rename {.github => .github_init}/workflows/build_wheels_macos_m1.yml (100%) rename {.github => .github_init}/workflows/build_wheels_windows.yml (100%) create mode 100644 Dockerfile.incode_build diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000..cac3fc73 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,46 @@ +name: Linux x86_64 incode +on: + push: + tags: + - "*_incode" + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ '3.10', '3.11' ] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: get tag + id: get_tag + run: | + tag=${{ github.ref_name }} + echo "tag: ${tag//[^0-9]/}" + echo "tag=${tag//[^0-9]/}" >> $GITHUB_OUTPUT + - name: Build wheel + uses: docker/build-push-action@v4 + with: + file: Dockerfile.incode_build + platforms: linux/amd64 + push: false + context: . + cache-from: type=gha + cache-to: type=gha,mode=max + target: export-stage + build-args: | + PYTHON_VERSION=${{ matrix.python-version }} + OPENCV_TAG=${{ steps.get_tag.outputs.tag }} + tags: | + incodetech/opencv-python-env + outputs: type=local,dest=./ + - name: Create release + if: ${{ startsWith(github.ref, 'refs/tags/') == true }} + uses: softprops/action-gh-release@v1 + with: + fail_on_unmatched_files: true + files: | + opencv_python_*.whl diff --git a/.github/issue_template.md b/.github_init/issue_template.md similarity index 100% rename from .github/issue_template.md rename to .github_init/issue_template.md diff --git a/.github/workflows/build_wheels_linux.yml b/.github_init/workflows/build_wheels_linux.yml similarity index 100% rename from .github/workflows/build_wheels_linux.yml rename to .github_init/workflows/build_wheels_linux.yml diff --git a/.github/workflows/build_wheels_linux_arm.yml b/.github_init/workflows/build_wheels_linux_arm.yml similarity index 100% rename from .github/workflows/build_wheels_linux_arm.yml rename to .github_init/workflows/build_wheels_linux_arm.yml diff --git a/.github/workflows/build_wheels_macos.yml b/.github_init/workflows/build_wheels_macos.yml similarity index 100% rename from .github/workflows/build_wheels_macos.yml rename to .github_init/workflows/build_wheels_macos.yml diff --git a/.github/workflows/build_wheels_macos_m1.yml b/.github_init/workflows/build_wheels_macos_m1.yml similarity index 100% rename from .github/workflows/build_wheels_macos_m1.yml rename to .github_init/workflows/build_wheels_macos_m1.yml diff --git a/.github/workflows/build_wheels_windows.yml b/.github_init/workflows/build_wheels_windows.yml similarity index 100% rename from .github/workflows/build_wheels_windows.yml rename to .github_init/workflows/build_wheels_windows.yml diff --git a/Dockerfile.incode_build b/Dockerfile.incode_build new file mode 100644 index 00000000..e1e91831 --- /dev/null +++ b/Dockerfile.incode_build @@ -0,0 +1,37 @@ +FROM ubuntu:20.04 as build-stage + +ARG PYTHON_VERSION +ARG OPENCV_TAG +ARG NUMPY_VERSION=1.23.5 + +RUN apt update && apt install -y software-properties-common curl + +RUN add-apt-repository -y 'ppa:deadsnakes/ppa' \ + && apt update && apt install -y --no-install-recommends \ + python${PYTHON_VERSION} python${PYTHON_VERSION}-venv python${PYTHON_VERSION}-dev \ + && rm -rf /var/lib/apt/lists/* \ + && curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} \ + && pip install -U pip \ + && pip --no-cache-dir install numpy==${NUMPY_VERSION} + +ENV VENV_ROOT_PREFIX=/opt/venv +RUN python${PYTHON_VERSION} -m venv ${VENV_ROOT_PREFIX} + + +WORKDIR /opt/ +RUN apt update && apt install -y git build-essential cmake libopenblas-dev liblapacke-dev libjpeg-dev \ + # trick to opencv find openblas and numpy headers + && cp /usr/include/x86_64-linux-gnu/cblas.h /usr/include/ \ + && ln -s /usr/local/lib/python${PYTHON_VERSION}/dist-packages/numpy/core/include/numpy /usr/include/numpy \ + && git clone https://github.com/opencv/opencv-python.git \ + && cd opencv-python \ + && git checkout ${OPENCV_TAG} \ + && git submodule update --init --recursive \ + && export ENABLE_HEADLESS=1 \ + && MAKEFLAGS='-j3' pip wheel . --verbose \ + # trick to pack openblas lib to wheel + && pip install auditwheel patchelf \ + && auditwheel repair *.whl --plat manylinux_2_31_x86_64 + +FROM scratch AS export-stage +COPY --from=build-stage /opt/opencv-python/wheelhouse / From 348b24a72dfb63d4c7250dfa8cc9dce9c60988af Mon Sep 17 00:00:00 2001 From: alexanderkomarovincode3 Date: Thu, 22 Aug 2024 16:10:15 +0200 Subject: [PATCH 21/22] Return original worfklow. I disabled it in github actions. --- {.github_init => .github}/issue_template.md | 0 {.github_init => .github}/workflows/build_wheels_linux.yml | 0 {.github_init => .github}/workflows/build_wheels_linux_arm.yml | 0 {.github_init => .github}/workflows/build_wheels_macos.yml | 0 {.github_init => .github}/workflows/build_wheels_macos_m1.yml | 0 {.github_init => .github}/workflows/build_wheels_windows.yml | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename {.github_init => .github}/issue_template.md (100%) rename {.github_init => .github}/workflows/build_wheels_linux.yml (100%) rename {.github_init => .github}/workflows/build_wheels_linux_arm.yml (100%) rename {.github_init => .github}/workflows/build_wheels_macos.yml (100%) rename {.github_init => .github}/workflows/build_wheels_macos_m1.yml (100%) rename {.github_init => .github}/workflows/build_wheels_windows.yml (100%) diff --git a/.github_init/issue_template.md b/.github/issue_template.md similarity index 100% rename from .github_init/issue_template.md rename to .github/issue_template.md diff --git a/.github_init/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml similarity index 100% rename from .github_init/workflows/build_wheels_linux.yml rename to .github/workflows/build_wheels_linux.yml diff --git a/.github_init/workflows/build_wheels_linux_arm.yml b/.github/workflows/build_wheels_linux_arm.yml similarity index 100% rename from .github_init/workflows/build_wheels_linux_arm.yml rename to .github/workflows/build_wheels_linux_arm.yml diff --git a/.github_init/workflows/build_wheels_macos.yml b/.github/workflows/build_wheels_macos.yml similarity index 100% rename from .github_init/workflows/build_wheels_macos.yml rename to .github/workflows/build_wheels_macos.yml diff --git a/.github_init/workflows/build_wheels_macos_m1.yml b/.github/workflows/build_wheels_macos_m1.yml similarity index 100% rename from .github_init/workflows/build_wheels_macos_m1.yml rename to .github/workflows/build_wheels_macos_m1.yml diff --git a/.github_init/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml similarity index 100% rename from .github_init/workflows/build_wheels_windows.yml rename to .github/workflows/build_wheels_windows.yml From e977dfedadc59f0e273cc3a33c9c382672da9e0f Mon Sep 17 00:00:00 2001 From: alexanderkomarovincode3 Date: Thu, 22 Aug 2024 16:11:19 +0200 Subject: [PATCH 22/22] Rename incode workflow file. --- .github/workflows/{build.yaml => build_wheels_linux_incode.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build.yaml => build_wheels_linux_incode.yml} (100%) diff --git a/.github/workflows/build.yaml b/.github/workflows/build_wheels_linux_incode.yml similarity index 100% rename from .github/workflows/build.yaml rename to .github/workflows/build_wheels_linux_incode.yml