diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index 45a38d06..7bfe8cec 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] @@ -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:20241202 USE_CCACHE: 0 UNICODE_WIDTH: 32 PLAT: x86_64 @@ -84,7 +84,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] 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.2.1 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 }}" -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 + run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" -o "3.13" == "${{ 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: @@ -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:20241202 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..d643ba8e 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] @@ -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:20241202 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', '3.12'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] 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.2.1 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 }}" -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 + run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" -o "3.13" == "${{ 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 dd3bc654..eb797d46 100644 --- a/.github/workflows/build_wheels_macos.yml +++ b/.github/workflows/build_wheels_macos.yml @@ -20,14 +20,14 @@ on: jobs: Build: - runs-on: macos-12 + runs-on: macos-13 defaults: run: shell: bash strategy: fail-fast: false matrix: - python-version: ['3.7'] + python-version: ['3.9'] platform: [x64] with_contrib: [0, 1] without_gui: [0, 1] @@ -98,14 +98,14 @@ jobs: Test: needs: [Build] - runs-on: macos-12 + runs-on: macos-13 defaults: run: shell: bash strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] 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.2.1 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 }}" -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 + run: if ["3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" -o "3.13" == "${{ 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 f0e41d3a..ffbdc752 100644 --- a/.github/workflows/build_wheels_macos_m1.yml +++ b/.github/workflows/build_wheels_macos_m1.yml @@ -20,11 +20,11 @@ on: jobs: Build: - runs-on: python-macos11-m1 + runs-on: python-macos12-m1 strategy: fail-fast: false matrix: - python-version: ['3.7'] + python-version: ['3.9'] platform: [x64] with_contrib: [0, 1] without_gui: [0, 1] @@ -54,7 +54,7 @@ jobs: git submodule update --init multibuild echo $ENABLE_CONTRIB > contrib.enabled echo $ENABLE_HEADLESS > headless.enabled - export MACOSX_DEPLOYMENT_TARGET=11.0 + export MACOSX_DEPLOYMENT_TARGET=13.0 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* @@ -71,11 +71,11 @@ jobs: Test: needs: [Build] - runs-on: opencv-cn-mac-arm64-tests + runs-on: python-macos12-m1 strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] 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..bb7b548b 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] @@ -59,6 +59,8 @@ jobs: architecture: ${{ matrix.platform }} - name: Setup MSBuild.exe uses: microsoft/setup-msbuild@v1.1 + - name: Setup NASM + uses: ilammy/setup-nasm@v1 - name: Build a package # CMake 3.25 regression fix. See https://stackoverflow.com/questions/74162633/problem-compiling-from-source-opencv-with-mvsc2019-in-64-bit-version run: | @@ -89,7 +91,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] platform: [x86, x64] with_contrib: [0, 1] without_gui: [0, 1] 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. diff --git a/MANIFEST.in b/MANIFEST.in index b429eae0..cb9a7e7b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,6 +4,7 @@ include README.md include find_version.py include setup.py include pyproject.toml +include _build_backend/backend.py recursive-include cv2 * recursive-include docker * recursive-include opencv * diff --git a/README.md b/README.md index 7f1e3a4c..3a4b46c2 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) @@ -157,7 +157,7 @@ If some dependency is not enabled in the pre-built wheels, you can also run the 4. Select the package flavor which you wish to build with `ENABLE_CONTRIB` and `ENABLE_HEADLESS`: i.e. `export ENABLE_CONTRIB=1` if you wish to build `opencv-contrib-python` 5. Run ``pip wheel . --verbose``. NOTE: make sure you have the latest ``pip`` version, the ``pip wheel`` command replaces the old ``python setup.py bdist_wheel`` command which does not support ``pyproject.toml``. - this might take anything from 5 minutes to over 2 hours depending on your hardware -6. Pip will print fresh will location at the end of build procedure. If you use old approach with `setup.py` file wheel package will be placed in `dist` folder. Package is ready and you can do with that whatever you wish. +6. Pip will print fresh wheel location at the end of build procedure. If you use old approach with `setup.py` file wheel package will be placed in `dist` folder. Package is ready and you can do with that whatever you wish. - Optional: on Linux use some of the `manylinux` images as a build hosts if maximum portability is needed and run `auditwheel` for the wheel after build - Optional: on macOS use ``delocate`` (same as ``auditwheel`` but for macOS) for better portability @@ -249,6 +249,6 @@ 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.7.0 the Mac OS GitHub Actions build environment was update to version 11. Mac OS 10.x support deprecated. 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. +Starting from version 4.9.0 the Mac OS GitHub Actions build environment was update to version 12. Mac OS 10.x support deprecated by Brew and most of used packages. diff --git a/_build_backend/backend.py b/_build_backend/backend.py new file mode 100644 index 00000000..7fc84138 --- /dev/null +++ b/_build_backend/backend.py @@ -0,0 +1,23 @@ +from setuptools import build_meta as _orig + +prepare_metadata_for_build_wheel = _orig.prepare_metadata_for_build_wheel +build_wheel = _orig.build_wheel +build_sdist = _orig.build_sdist +get_requires_for_build_sdist = _orig.get_requires_for_build_sdist + +def get_requires_for_build_wheel(config_settings=None): + from packaging import version + from skbuild.exceptions import SKBuildError + from skbuild.cmaker import get_cmake_version + packages = _orig.get_requires_for_build_wheel(config_settings) + # check if system cmake can be used if present + # if not, append cmake PyPI distribution to required packages + # scikit-build>=0.18 itself requires cmake 3.5+ + min_version = "3.5" + try: + if version.parse(get_cmake_version().split("-")[0]) < version.parse(min_version): + packages.append(f'cmake>={min_version}') + except SKBuildError: + packages.append(f'cmake>={min_version}') + + return packages diff --git a/docker/manylinux2014/Dockerfile_aarch64 b/docker/manylinux2014/Dockerfile_aarch64 index 196c97bb..9a8bfdde 100644 --- a/docker/manylinux2014/Dockerfile_aarch64 +++ b/docker/manylinux2014/Dockerfile_aarch64 @@ -1,16 +1,16 @@ -# Version: 20231225 +# 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.40 -ARG VPX_VERSION=v1.13.1 +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.0 +ARG QT_VERSION=5.15.16 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..088d8df5 100644 --- a/docker/manylinux2014/Dockerfile_x86_64 +++ b/docker/manylinux2014/Dockerfile_x86_64 @@ -1,16 +1,16 @@ -# Version: 20231225 +# 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.40 -ARG VPX_VERSION=v1.13.1 +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.0 +ARG QT_VERSION=5.15.16 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/opencv b/opencv index dad8af6b..31b0eeea 160000 --- a/opencv +++ b/opencv @@ -1 +1 @@ -Subproject commit dad8af6b17f8e60d7b95a1203a1b4d22f56574cf +Subproject commit 31b0eeea0b44b370fd0712312df4214d4ae1b158 diff --git a/opencv_contrib b/opencv_contrib index c7602a8f..0e5254eb 160000 --- a/opencv_contrib +++ b/opencv_contrib @@ -1 +1 @@ -Subproject commit c7602a8f74205e44389bd6a4e8d727d32e7e27b4 +Subproject commit 0e5254ebf54d2aed6e7eaf6660bf3b797cf50a02 diff --git a/opencv_extra b/opencv_extra index 7f0ba7ad..a74cf6ba 160000 --- a/opencv_extra +++ b/opencv_extra @@ -1 +1 @@ -Subproject commit 7f0ba7adefcbbbe3df7d939f5246ba0382c7c629 +Subproject commit a74cf6bae7fd75d91282b877c559168b3a62148a diff --git a/patches/patchQtPlugins b/patches/patchQtPlugins index a05a5f83..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.0/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/pyproject.toml b/pyproject.toml index 00176366..d70b49ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,16 +1,18 @@ [build-system] requires = [ - "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'", - "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.22.2; python_version>='3.11'", + "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'", + "packaging", "pip", "scikit-build>=0.14.0", - "setuptools==59.2.0", + "setuptools==59.2.0; python_version<'3.12'", + "setuptools<70.0.0; python_version>='3.12'", ] +# use a custom backend to manage CMake check / installation +# see https://scikit-build.readthedocs.io/en/latest/usage.html#adding-cmake-as-building-requirement-only-if-not-installed-or-too-low-a-version +build-backend = "backend" +backend-path = ["_build_backend"] diff --git a/setup.py b/setup.py index 766b4bb4..1dfab2fb 100644 --- a/setup.py +++ b/setup.py @@ -110,7 +110,7 @@ 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 [] ) @@ -118,8 +118,11 @@ def main(): # 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. + # If not specifying PY_LIMITED_API, the Python sources go under python/cv2/python-3.MINOR_VERSION/ instead of python/cv2/python-3/ [ - r"python/cv2/python-%s/cv2.*" + r"python/cv2/python-%s*/cv2.*" + % (sys.version_info[0]) if 'CMAKE_ARGS' in os.environ and "-DPYTHON3_LIMITED_API=ON" in os.environ['CMAKE_ARGS'] + else r"python/cv2/python-%s.*/cv2.*" % (sys.version_info[0]) ] + @@ -300,6 +303,7 @@ def main(): "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: C++", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Scientific/Engineering", @@ -310,7 +314,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: """ diff --git a/travis_config.sh b/travis_config.sh index b91d63c4..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.0/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