From 375b19b860d722134eb645f07abf5907b99b80c5 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Thu, 30 May 2024 15:57:03 +0300 Subject: [PATCH 01/14] Update submodules to 4.10.0-pre for testing. --- opencv | 2 +- opencv_contrib | 2 +- opencv_extra | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opencv b/opencv index dad8af6b..3e3ee106 160000 --- a/opencv +++ b/opencv @@ -1 +1 @@ -Subproject commit dad8af6b17f8e60d7b95a1203a1b4d22f56574cf +Subproject commit 3e3ee106fb8ccd003aa2c9a943a2340b066537bc 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..723bdf22 160000 --- a/opencv_extra +++ b/opencv_extra @@ -1 +1 @@ -Subproject commit 7f0ba7adefcbbbe3df7d939f5246ba0382c7c629 +Subproject commit 723bdf221b56e5852d27cdfe4efb71d08bafb2fe From 4cd2687166408b9473aad84cd6ab082f87a0a920 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Thu, 30 May 2024 16:15:39 +0300 Subject: [PATCH 02/14] Update donation link. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 766b4bb4..50fa7639 100644 --- a/setup.py +++ b/setup.py @@ -310,7 +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#/") + 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 30ee36bbdf3a53ad7036c656311d8ce64a056afb Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Fri, 31 May 2024 10:25:22 +0300 Subject: [PATCH 03/14] Use 4 digits in OpenCV version since 4.10.0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 50fa7639..fd4181d0 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 [] ) From 882af5b499e0e5a17523962ee175c98d75e6e643 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Fri, 31 May 2024 12:04:07 +0300 Subject: [PATCH 04/14] Add OrbbecSDK library to package for MacOS ARM. It's aways enabled during library build. --- setup.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup.py b/setup.py index fd4181d0..9ec558a6 100644 --- a/setup.py +++ b/setup.py @@ -115,6 +115,12 @@ def main(): else [] ) + + ( + [r"lib/libOrbbecSDK\.\d\.\d\.\d.dylib"] + if os.name == "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. From 22c0895c8d498613497d896fb3898adbdfef2f5a Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Fri, 31 May 2024 12:43:15 +0300 Subject: [PATCH 05/14] Alternative solution for Orbbec on MacOS --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 9ec558a6..5e625ffc 100644 --- a/setup.py +++ b/setup.py @@ -102,6 +102,7 @@ def main(): package_data = { "cv2": ["*%s" % sysconfig.get_config_vars().get("SO"), "version.py"] + (["*.dll"] if os.name == "nt" else []) + + (["*.dynlib"] if os.name == "Darwin" else []) + ["LICENSE.txt", "LICENSE-3RD-PARTY.txt"], "cv2.data": ["*.xml"], } @@ -116,8 +117,8 @@ def main(): ) + ( - [r"lib/libOrbbecSDK\.\d\.\d\.\d.dylib"] - if os.name == "Darwin" and platform.machine() == "ARM64" + [r"lib/libOrbbecSDK\..*\.dylib"] + if os.name == "Darwin" else [] ) + From 7638be6d13b1a163742a96e2437ad8ff58f036b1 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Sun, 2 Jun 2024 14:53:11 +0300 Subject: [PATCH 06/14] Bug fixes. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 5e625ffc..1520c71f 100644 --- a/setup.py +++ b/setup.py @@ -102,7 +102,7 @@ def main(): package_data = { "cv2": ["*%s" % sysconfig.get_config_vars().get("SO"), "version.py"] + (["*.dll"] if os.name == "nt" else []) - + (["*.dynlib"] if os.name == "Darwin" else []) + + (["*.dylib"] if os.name == "Darwin" else []) + ["LICENSE.txt", "LICENSE-3RD-PARTY.txt"], "cv2.data": ["*.xml"], } @@ -117,7 +117,7 @@ def main(): ) + ( - [r"lib/libOrbbecSDK\..*\.dylib"] + [r"bin/libOrbbecSDK.*\.dylib"] if os.name == "Darwin" else [] ) From 6839a27b7d76788ac30a49661907d6841bcc2560 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Sun, 2 Jun 2024 16:54:57 +0300 Subject: [PATCH 07/14] Abs file names for OrbbecSDK. --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 1520c71f..037c4f36 100644 --- a/setup.py +++ b/setup.py @@ -117,9 +117,9 @@ def main(): ) + ( - [r"bin/libOrbbecSDK.*\.dylib"] - if os.name == "Darwin" - else [] + [r"lib/libOrbbecSDK.dylib", r"lib/libOrbbecSDK.1.9.dylib", r"lib/libOrbbecSDK.1.9.4.dylib"] + #if os.name == "Darwin" + #else [] ) + # In Windows, in python/X.Y//; in Linux, in just python/X.Y/. From bb7ad9b8f9124270488b6c67182e52dcc915a4d7 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Sun, 2 Jun 2024 17:52:17 +0300 Subject: [PATCH 08/14] Restored Darwin check. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 037c4f36..2187c788 100644 --- a/setup.py +++ b/setup.py @@ -118,8 +118,8 @@ def main(): + ( [r"lib/libOrbbecSDK.dylib", r"lib/libOrbbecSDK.1.9.dylib", r"lib/libOrbbecSDK.1.9.4.dylib"] - #if os.name == "Darwin" - #else [] + if os.name == "Darwin" + else [] ) + # In Windows, in python/X.Y//; in Linux, in just python/X.Y/. From fcbd6dd87259c4b0a2ea4a29bc73a954ec7f2e41 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Sun, 2 Jun 2024 18:54:48 +0300 Subject: [PATCH 09/14] Another try --- setup.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 2187c788..9b687141 100644 --- a/setup.py +++ b/setup.py @@ -102,7 +102,6 @@ def main(): package_data = { "cv2": ["*%s" % sysconfig.get_config_vars().get("SO"), "version.py"] + (["*.dll"] if os.name == "nt" else []) - + (["*.dylib"] if os.name == "Darwin" else []) + ["LICENSE.txt", "LICENSE-3RD-PARTY.txt"], "cv2.data": ["*.xml"], } @@ -117,8 +116,8 @@ def main(): ) + ( - [r"lib/libOrbbecSDK.dylib", r"lib/libOrbbecSDK.1.9.dylib", r"lib/libOrbbecSDK.1.9.4.dylib"] - if os.name == "Darwin" + [r"lib/libOrbbecSDK.dylib", r"lib/libOrbbecSDK.\d.\d.dylib", r"lib/libOrbbecSDK.\d.\d.\d.dylib"] + if sys.platform == "darwin" and else [] ) + From da63b3d64bf2dfdde64d3df6a8bc70217cf8eedf Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Sun, 2 Jun 2024 19:17:05 +0300 Subject: [PATCH 10/14] Syntax fix. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9b687141..3a27f4a4 100644 --- a/setup.py +++ b/setup.py @@ -117,7 +117,7 @@ def main(): + ( [r"lib/libOrbbecSDK.dylib", r"lib/libOrbbecSDK.\d.\d.dylib", r"lib/libOrbbecSDK.\d.\d.\d.dylib"] - if sys.platform == "darwin" and + if sys.platform == "darwin" else [] ) + From 215cda6fe2ffb09a25b9c63fad245df542d39c5d Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Sun, 2 Jun 2024 19:52:14 +0300 Subject: [PATCH 11/14] Fix mac intel. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3a27f4a4..fcdb2277 100644 --- a/setup.py +++ b/setup.py @@ -117,7 +117,7 @@ def main(): + ( [r"lib/libOrbbecSDK.dylib", r"lib/libOrbbecSDK.\d.\d.dylib", r"lib/libOrbbecSDK.\d.\d.\d.dylib"] - if sys.platform == "darwin" + if plaform.system() == "darwin" and platform.machine() == "ARM64" else [] ) + From b56e0f5244ae170b9bfbbdfeec6cda9f7a831751 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Sun, 2 Jun 2024 20:24:12 +0300 Subject: [PATCH 12/14] Typo --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index fcdb2277..14284604 100644 --- a/setup.py +++ b/setup.py @@ -117,7 +117,7 @@ def main(): + ( [r"lib/libOrbbecSDK.dylib", r"lib/libOrbbecSDK.\d.\d.dylib", r"lib/libOrbbecSDK.\d.\d.\d.dylib"] - if plaform.system() == "darwin" and platform.machine() == "ARM64" + if platform.system() == "darwin" and platform.machine() == "ARM64" else [] ) + From 12bf0c30c6244cbc511713b0d3967c5466c92f99 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Mon, 3 Jun 2024 09:30:40 +0300 Subject: [PATCH 13/14] Submodules update to tag 4.10.0. --- opencv | 2 +- opencv_extra | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opencv b/opencv index 3e3ee106..71d3237a 160000 --- a/opencv +++ b/opencv @@ -1 +1 @@ -Subproject commit 3e3ee106fb8ccd003aa2c9a943a2340b066537bc +Subproject commit 71d3237a093b60a27601c20e9ee6c3e52154e8b1 diff --git a/opencv_extra b/opencv_extra index 723bdf22..dd1fbd07 160000 --- a/opencv_extra +++ b/opencv_extra @@ -1 +1 @@ -Subproject commit 723bdf221b56e5852d27cdfe4efb71d08bafb2fe +Subproject commit dd1fbd0717ef4d83f86899b4144fdd9bc0364a5f diff --git a/setup.py b/setup.py index 14284604..0432e48e 100644 --- a/setup.py +++ b/setup.py @@ -117,7 +117,7 @@ def main(): + ( [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" + if platform.system() == "darwin" and platform.machine() == "arm64" else [] ) + From 9c3fee16de3607b07752af851b2df8fb798e6caf Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Mon, 3 Jun 2024 09:52:18 +0300 Subject: [PATCH 14/14] Typo fix. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0432e48e..48d5a65f 100644 --- a/setup.py +++ b/setup.py @@ -117,7 +117,7 @@ def main(): + ( [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" + if platform.system() == "Darwin" and platform.machine() == "arm64" else [] ) +