From 3ce97067c4fd927adb9db2b12db4467ba021a759 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 11:33:41 +0800 Subject: [PATCH 01/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 52 +++++++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/opencv.spec b/opencv.spec index dfbcdcf..7e1a973 100644 --- a/opencv.spec +++ b/opencv.spec @@ -30,31 +30,37 @@ tar -xvf %{SOURCE1} -C . pwd %build +pip install numpy mkdir -p cmake/build cd cmake/build -cmake ../../ -DCMAKE_BUILD_TYPE=Release\ - -DWITH_PROTOBUF=OFF\ - -DWITH_WEBP=OFF\ - -DWITH_IPP=OFF\ - -DWITH_ADE=OFF\ - -DBUILD_ZLIB=ON\ - -DBUILD_JPEG=ON\ - -DBUILD_PNG=ON\ - -DBUILD_OPENEXR=ON\ - -DBUILD_TESTS=ON\ - -DBUILD_PERF_TESTS=OFF\ - -DBUILD_opencv_apps=OFF\ - -DBUILD_opencv_python3=ON\ - -DWITH_FFMPEG=OFF\ - -DWITH_TIFF=ON\ - -DBUILD_TIFF=OFF\ - -DWITH_JASPER=OFF\ - -DBUILD_JASPER=OFF\ - -DBUILD_SHARED_LIBS=ON\ - -DBUILD_EXAMPLES=ON\ - -DOPENCV_TEST_DATA_PATH=%_builddir/%{name}-%{version}/opencv_extra-%{version}/testdata\ - -DINSTALL_TESTS=ON\ - -DCMAKE_INSTALL_PREFIX=/usr +cmake ../../ -D CMAKE_BUILD_TYPE=Release\ + -D WITH_PROTOBUF=OFF\ + -D WITH_WEBP=OFF\ + -D WITH_IPP=OFF\ + -D WITH_ADE=OFF\ + -D BUILD_ZLIB=ON\ + -D BUILD_JPEG=ON\ + -D BUILD_PNG=ON\ + -D BUILD_OPENEXR=ON\ + -D BUILD_TESTS=ON\ + -D BUILD_PERF_TESTS=OFF\ + -D BUILD_opencv_apps=OFF\ + -D BUILD_opencv_python3=ON\ + -D BUILD_opencv_python2=OFF \ + -D BUILD_opencv_java=OFF \ + -D WITH_FFMPEG=OFF\ + -D WITH_TIFF=ON\ + -D BUILD_TIFF=OFF\ + -D WITH_JASPER=OFF\ + -D BUILD_JASPER=OFF\ + -D BUILD_SHARED_LIBS=ON\ + -D BUILD_EXAMPLES=ON\ + -D PYTHON_EXECUTABLE=$(which python3) \ + -D PYTHON_DEFAULT_EXECUTABLE=$(python -c "import sys; print(sys.executable)") \ + -D PYTHON_NUMPY_INCLUDE_DIRS=$(python -c "import numpy; print (numpy.get_include())") \ + -D PYTHON3_PACKAGES_PATH=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \ + -D INSTALL_TESTS=ON\ + -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From 701add541759032b0ac211d0a6230cbea12536c4 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 12:18:03 +0800 Subject: [PATCH 02/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 7e1a973..3d57a1f 100644 --- a/opencv.spec +++ b/opencv.spec @@ -28,9 +28,9 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd +pip install numpy %build -pip install numpy mkdir -p cmake/build cd cmake/build cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -- Gitee From 2505c5de75c71a6b1019e465e3f5b225087dd2c7 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 13:21:03 +0800 Subject: [PATCH 03/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 3d57a1f..66bbb28 100644 --- a/opencv.spec +++ b/opencv.spec @@ -28,7 +28,7 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd -pip install numpy +/usr/bin/python3 pip install numpy %build mkdir -p cmake/build -- Gitee From fc663a9417223f636aa4990093b256d50c0942e0 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 13:34:26 +0800 Subject: [PATCH 04/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 66bbb28..0b4bfb4 100644 --- a/opencv.spec +++ b/opencv.spec @@ -28,7 +28,10 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd -/usr/bin/python3 pip install numpy +which python +which pip +which python3 +which pip3 %build mkdir -p cmake/build -- Gitee From 610af1f3a7c68b1587a349014f17d5babae0298f Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 13:48:21 +0800 Subject: [PATCH 05/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/opencv.spec b/opencv.spec index 0b4bfb4..71490d1 100644 --- a/opencv.spec +++ b/opencv.spec @@ -49,8 +49,8 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D BUILD_PERF_TESTS=OFF\ -D BUILD_opencv_apps=OFF\ -D BUILD_opencv_python3=ON\ - -D BUILD_opencv_python2=OFF \ - -D BUILD_opencv_java=OFF \ + -D BUILD_opencv_python2=OFF\ + -D BUILD_opencv_java=OFF\ -D WITH_FFMPEG=OFF\ -D WITH_TIFF=ON\ -D BUILD_TIFF=OFF\ @@ -58,10 +58,6 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D BUILD_JASPER=OFF\ -D BUILD_SHARED_LIBS=ON\ -D BUILD_EXAMPLES=ON\ - -D PYTHON_EXECUTABLE=$(which python3) \ - -D PYTHON_DEFAULT_EXECUTABLE=$(python -c "import sys; print(sys.executable)") \ - -D PYTHON_NUMPY_INCLUDE_DIRS=$(python -c "import numpy; print (numpy.get_include())") \ - -D PYTHON3_PACKAGES_PATH=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \ -D INSTALL_TESTS=ON\ -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 -- Gitee From d3297822372afed4d279d457733dc98de3da2dcb Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 14:08:42 +0800 Subject: [PATCH 06/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index 71490d1..801bf55 100644 --- a/opencv.spec +++ b/opencv.spec @@ -28,8 +28,8 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd -which python -which pip +ls -l /usr/bin/ | grep python +ls -l /usr/bin/ | grep pip which python3 which pip3 -- Gitee From 5a9d83d0db92a060130370cf9cd5a69fd2a4a999 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 14:25:32 +0800 Subject: [PATCH 07/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index 801bf55..b514802 100644 --- a/opencv.spec +++ b/opencv.spec @@ -30,8 +30,11 @@ tar -xvf %{SOURCE1} -C . pwd ls -l /usr/bin/ | grep python ls -l /usr/bin/ | grep pip -which python3 -which pip3 +echo $(which python3) +echo $(which pip3) +echo $(which python) +echo $(which pip) +which python %build mkdir -p cmake/build -- Gitee From ec854ffd5869b635256d459ada779cdf264b88b4 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 14:49:07 +0800 Subject: [PATCH 08/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index b514802..dfbc65c 100644 --- a/opencv.spec +++ b/opencv.spec @@ -29,7 +29,6 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} tar -xvf %{SOURCE1} -C . pwd ls -l /usr/bin/ | grep python -ls -l /usr/bin/ | grep pip echo $(which python3) echo $(which pip3) echo $(which python) -- Gitee From 02b9f5f83a89aaf6b0e7a89f65aeb0ed1d2caa43 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 15:41:05 +0800 Subject: [PATCH 09/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/opencv.spec b/opencv.spec index dfbc65c..639fcca 100644 --- a/opencv.spec +++ b/opencv.spec @@ -15,6 +15,7 @@ Patch1: Fix-OpenCV-build-with-OpenEXR-before-2.2.0.patch Patch2: Fix_compilation_of_copy_assignment_operators_with_GCC.patch BuildRequires: gcc-c++ gcc autoconf pkgconfig protobuf-compiler protobuf BuildRequires: cmake +BuildRequires: python3-numpy %description OpenCV means Intel® Open Source Computer Vision Library. It is a collection of @@ -28,12 +29,6 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd -ls -l /usr/bin/ | grep python -echo $(which python3) -echo $(which pip3) -echo $(which python) -echo $(which pip) -which python %build mkdir -p cmake/build @@ -61,6 +56,10 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D BUILD_SHARED_LIBS=ON\ -D BUILD_EXAMPLES=ON\ -D INSTALL_TESTS=ON\ + -D PYTHON_EXECUTABLE=$(which python3)\ + -D PYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ + -D PYTHON_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ + -D PYTHON3_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")\ -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From cdd97edb0fc2766cd47b2d68c8954dd2325a9e60 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 16:40:01 +0800 Subject: [PATCH 10/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/opencv.spec b/opencv.spec index 639fcca..7a8f58d 100644 --- a/opencv.spec +++ b/opencv.spec @@ -56,10 +56,11 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D BUILD_SHARED_LIBS=ON\ -D BUILD_EXAMPLES=ON\ -D INSTALL_TESTS=ON\ - -D PYTHON_EXECUTABLE=$(which python3)\ + -D PYTHON3_EXECUTABLE=$(which python3)\ -D PYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ - -D PYTHON_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ - -D PYTHON3_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")\ + -D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ + -D PYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \ + -D PYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From 954f97e8e903d09711e964bd1d11cfc37c5753d6 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 17:14:09 +0800 Subject: [PATCH 11/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 7a8f58d..df6ce8b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -60,7 +60,7 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D PYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ -D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ -D PYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \ - -D PYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") + -D PYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From 117b2b412c76375a092efb270d490158b7fed1f9 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 17:17:23 +0800 Subject: [PATCH 12/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index df6ce8b..94c93db 100644 --- a/opencv.spec +++ b/opencv.spec @@ -59,8 +59,8 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D PYTHON3_EXECUTABLE=$(which python3)\ -D PYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ -D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ - -D PYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \ - -D PYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") + -D PYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ + -D PYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))")\ -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From 7b320c13496a3effaf217ac724b156acf9c190b4 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 18:01:36 +0800 Subject: [PATCH 13/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/opencv.spec b/opencv.spec index 94c93db..89b2d4d 100644 --- a/opencv.spec +++ b/opencv.spec @@ -29,6 +29,7 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd +ll /usr/lib64/ | grep libpython %build mkdir -p cmake/build -- Gitee From 4b0562165502929da932022b1d1b244bc37feb1a Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 18:16:11 +0800 Subject: [PATCH 14/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index 89b2d4d..5dbc4ad 100644 --- a/opencv.spec +++ b/opencv.spec @@ -29,7 +29,7 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd -ll /usr/lib64/ | grep libpython +ls /usr/lib64 | grep libpython3 %build mkdir -p cmake/build @@ -61,7 +61,7 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D PYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ -D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ -D PYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ - -D PYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))")\ + -D PYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')/libpython3.so)")\ -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From 46b4452385e18de32ad6a385dbdbdbdd24124c3c Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 18:33:12 +0800 Subject: [PATCH 15/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/opencv.spec b/opencv.spec index 5dbc4ad..85e504a 100644 --- a/opencv.spec +++ b/opencv.spec @@ -29,7 +29,6 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd -ls /usr/lib64 | grep libpython3 %build mkdir -p cmake/build @@ -60,8 +59,8 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D PYTHON3_EXECUTABLE=$(which python3)\ -D PYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ -D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ - -D PYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ - -D PYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')/libpython3.so)")\ + -D PYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ + -D PYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))+ '//libpython3.so'")\ -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From a489a2ab86dd265985afe9b34c9069e590124f4a Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 18:38:17 +0800 Subject: [PATCH 16/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 85e504a..1f22ab3 100644 --- a/opencv.spec +++ b/opencv.spec @@ -60,7 +60,7 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D PYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ -D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ -D PYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ - -D PYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))+ '//libpython3.so'")\ + -D PYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From ae2e12e4af3cf7f1dc71e5498ae7b6426d59da09 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 18:55:39 +0800 Subject: [PATCH 17/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opencv.spec b/opencv.spec index 1f22ab3..82cd23a 100644 --- a/opencv.spec +++ b/opencv.spec @@ -61,6 +61,9 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ -D PYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ -D PYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ + -D PYTHON3_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ + -D PYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ + -D PYTHON_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From 085b60a448af13e0e220691ed96cc8429fab0a9c Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 19:29:42 +0800 Subject: [PATCH 18/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opencv.spec b/opencv.spec index 82cd23a..ede648b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -29,6 +29,7 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd +ls -l /usr/include/python3.8 | grep Python %build mkdir -p cmake/build @@ -57,9 +58,11 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D BUILD_EXAMPLES=ON\ -D INSTALL_TESTS=ON\ -D PYTHON3_EXECUTABLE=$(which python3)\ + -D PYTHON_EXECUTABLE=$(which python3)\ -D PYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ -D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ -D PYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ + -D PYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ -D PYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ -D PYTHON3_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ -D PYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ -- Gitee From a395bcf1f803431be94e5257ebefc703541837c6 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 20:53:22 +0800 Subject: [PATCH 19/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/opencv.spec b/opencv.spec index ede648b..6d78660 100644 --- a/opencv.spec +++ b/opencv.spec @@ -16,6 +16,7 @@ Patch2: Fix_compilation_of_copy_assignment_operators_with_GCC.patch BuildRequires: gcc-c++ gcc autoconf pkgconfig protobuf-compiler protobuf BuildRequires: cmake BuildRequires: python3-numpy +BuildRequires: python3-devel %description OpenCV means Intel® Open Source Computer Vision Library. It is a collection of -- Gitee From 1306eb6525bff4d9959f1cdc99b714373f4945fc Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Thu, 18 Nov 2021 09:33:51 +0800 Subject: [PATCH 20/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 6d78660..10063b5 100644 --- a/opencv.spec +++ b/opencv.spec @@ -30,7 +30,6 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd -ls -l /usr/include/python3.8 | grep Python %build mkdir -p cmake/build @@ -57,6 +56,7 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D BUILD_JASPER=OFF\ -D BUILD_SHARED_LIBS=ON\ -D BUILD_EXAMPLES=ON\ + -DOPENCV_TEST_DATA_PATH=%_builddir/%{name}-%{version}/opencv_extra-%{version}/testdata\ -D INSTALL_TESTS=ON\ -D PYTHON3_EXECUTABLE=$(which python3)\ -D PYTHON_EXECUTABLE=$(which python3)\ -- Gitee From 88742b78848c94cd46c29c0bcf9dc99129810a69 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Thu, 18 Nov 2021 12:12:44 +0800 Subject: [PATCH 21/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opencv.spec b/opencv.spec index 10063b5..2d02561 100644 --- a/opencv.spec +++ b/opencv.spec @@ -84,6 +84,8 @@ make install DESTDIR=%{buildroot} %{_libdir}/* %{_includedir}/* %exclude /usr/share/* +$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/cv2/* + %changelog * Sat Nov 13 2021 shenwei - 4.5.2-3 -- Gitee From b37a785f5f15ff038df750947bcbc783497fa8d5 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 11:33:41 +0800 Subject: [PATCH 22/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 52 +++++++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/opencv.spec b/opencv.spec index b838d3e..b3ae55b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -31,31 +31,37 @@ tar -xvf %{SOURCE1} -C . pwd %build +pip install numpy mkdir -p cmake/build cd cmake/build -cmake ../../ -DCMAKE_BUILD_TYPE=Release\ - -DWITH_PROTOBUF=OFF\ - -DWITH_WEBP=OFF\ - -DWITH_IPP=OFF\ - -DWITH_ADE=OFF\ - -DBUILD_ZLIB=ON\ - -DBUILD_JPEG=ON\ - -DBUILD_PNG=ON\ - -DBUILD_OPENEXR=ON\ - -DBUILD_TESTS=ON\ - -DBUILD_PERF_TESTS=OFF\ - -DBUILD_opencv_apps=OFF\ - -DBUILD_opencv_python3=ON\ - -DWITH_FFMPEG=OFF\ - -DWITH_TIFF=ON\ - -DBUILD_TIFF=OFF\ - -DWITH_JASPER=OFF\ - -DBUILD_JASPER=OFF\ - -DBUILD_SHARED_LIBS=ON\ - -DBUILD_EXAMPLES=ON\ - -DOPENCV_TEST_DATA_PATH=%_builddir/%{name}-%{version}/opencv_extra-%{version}/testdata\ - -DINSTALL_TESTS=ON\ - -DCMAKE_INSTALL_PREFIX=/usr +cmake ../../ -D CMAKE_BUILD_TYPE=Release\ + -D WITH_PROTOBUF=OFF\ + -D WITH_WEBP=OFF\ + -D WITH_IPP=OFF\ + -D WITH_ADE=OFF\ + -D BUILD_ZLIB=ON\ + -D BUILD_JPEG=ON\ + -D BUILD_PNG=ON\ + -D BUILD_OPENEXR=ON\ + -D BUILD_TESTS=ON\ + -D BUILD_PERF_TESTS=OFF\ + -D BUILD_opencv_apps=OFF\ + -D BUILD_opencv_python3=ON\ + -D BUILD_opencv_python2=OFF \ + -D BUILD_opencv_java=OFF \ + -D WITH_FFMPEG=OFF\ + -D WITH_TIFF=ON\ + -D BUILD_TIFF=OFF\ + -D WITH_JASPER=OFF\ + -D BUILD_JASPER=OFF\ + -D BUILD_SHARED_LIBS=ON\ + -D BUILD_EXAMPLES=ON\ + -D PYTHON_EXECUTABLE=$(which python3) \ + -D PYTHON_DEFAULT_EXECUTABLE=$(python -c "import sys; print(sys.executable)") \ + -D PYTHON_NUMPY_INCLUDE_DIRS=$(python -c "import numpy; print (numpy.get_include())") \ + -D PYTHON3_PACKAGES_PATH=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \ + -D INSTALL_TESTS=ON\ + -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From f7db79e81234fe9279f067abe378b2b9ee1345ad Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 12:18:03 +0800 Subject: [PATCH 23/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index b3ae55b..d3debff 100644 --- a/opencv.spec +++ b/opencv.spec @@ -29,9 +29,9 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd +pip install numpy %build -pip install numpy mkdir -p cmake/build cd cmake/build cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -- Gitee From 8b9a374de62e32e13a5b2ded3daac46b24ffe281 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 13:21:03 +0800 Subject: [PATCH 24/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index d3debff..c648380 100644 --- a/opencv.spec +++ b/opencv.spec @@ -29,7 +29,7 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd -pip install numpy +/usr/bin/python3 pip install numpy %build mkdir -p cmake/build -- Gitee From 476c8af387d485ba7d389b6060c40f25d95d77a9 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 13:34:26 +0800 Subject: [PATCH 25/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index c648380..b1e56d6 100644 --- a/opencv.spec +++ b/opencv.spec @@ -29,7 +29,10 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd -/usr/bin/python3 pip install numpy +which python +which pip +which python3 +which pip3 %build mkdir -p cmake/build -- Gitee From 2d6acbbbd94f891bf5a70d7bdbecb6ee4c6ef14f Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 13:48:21 +0800 Subject: [PATCH 26/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/opencv.spec b/opencv.spec index b1e56d6..f725331 100644 --- a/opencv.spec +++ b/opencv.spec @@ -50,8 +50,8 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D BUILD_PERF_TESTS=OFF\ -D BUILD_opencv_apps=OFF\ -D BUILD_opencv_python3=ON\ - -D BUILD_opencv_python2=OFF \ - -D BUILD_opencv_java=OFF \ + -D BUILD_opencv_python2=OFF\ + -D BUILD_opencv_java=OFF\ -D WITH_FFMPEG=OFF\ -D WITH_TIFF=ON\ -D BUILD_TIFF=OFF\ @@ -59,10 +59,6 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D BUILD_JASPER=OFF\ -D BUILD_SHARED_LIBS=ON\ -D BUILD_EXAMPLES=ON\ - -D PYTHON_EXECUTABLE=$(which python3) \ - -D PYTHON_DEFAULT_EXECUTABLE=$(python -c "import sys; print(sys.executable)") \ - -D PYTHON_NUMPY_INCLUDE_DIRS=$(python -c "import numpy; print (numpy.get_include())") \ - -D PYTHON3_PACKAGES_PATH=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \ -D INSTALL_TESTS=ON\ -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 -- Gitee From 3bc222119e003841a7a12e9333b1a644f4f43c47 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 14:08:42 +0800 Subject: [PATCH 27/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index f725331..637d24e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -29,8 +29,8 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd -which python -which pip +ls -l /usr/bin/ | grep python +ls -l /usr/bin/ | grep pip which python3 which pip3 -- Gitee From 1640900b97d06dddd1443174330fdf247803a5fb Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 14:25:32 +0800 Subject: [PATCH 28/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index 637d24e..963f207 100644 --- a/opencv.spec +++ b/opencv.spec @@ -31,8 +31,11 @@ tar -xvf %{SOURCE1} -C . pwd ls -l /usr/bin/ | grep python ls -l /usr/bin/ | grep pip -which python3 -which pip3 +echo $(which python3) +echo $(which pip3) +echo $(which python) +echo $(which pip) +which python %build mkdir -p cmake/build -- Gitee From 76d0e57413de5c9f03d3732a56df78124c5c9766 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 14:49:07 +0800 Subject: [PATCH 29/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 963f207..e3e9fc3 100644 --- a/opencv.spec +++ b/opencv.spec @@ -30,7 +30,6 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} tar -xvf %{SOURCE1} -C . pwd ls -l /usr/bin/ | grep python -ls -l /usr/bin/ | grep pip echo $(which python3) echo $(which pip3) echo $(which python) -- Gitee From dd3d534d79cbeffa88255e8aef98286d20bc5e4d Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 15:41:05 +0800 Subject: [PATCH 30/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/opencv.spec b/opencv.spec index e3e9fc3..1cf9758 100644 --- a/opencv.spec +++ b/opencv.spec @@ -16,6 +16,7 @@ Patch2: Fix_compilation_of_copy_assignment_operators_with_GCC.patch Patch3: Repair_clang_abi.patch BuildRequires: gcc-c++ gcc autoconf pkgconfig protobuf-compiler protobuf BuildRequires: cmake +BuildRequires: python3-numpy %description OpenCV means Intel® Open Source Computer Vision Library. It is a collection of @@ -29,12 +30,6 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd -ls -l /usr/bin/ | grep python -echo $(which python3) -echo $(which pip3) -echo $(which python) -echo $(which pip) -which python %build mkdir -p cmake/build @@ -62,6 +57,10 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D BUILD_SHARED_LIBS=ON\ -D BUILD_EXAMPLES=ON\ -D INSTALL_TESTS=ON\ + -D PYTHON_EXECUTABLE=$(which python3)\ + -D PYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ + -D PYTHON_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ + -D PYTHON3_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")\ -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From b794863fd0f4edfb8cf407ef076dc354abc0d714 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 16:40:01 +0800 Subject: [PATCH 31/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/opencv.spec b/opencv.spec index 1cf9758..660a0da 100644 --- a/opencv.spec +++ b/opencv.spec @@ -57,10 +57,11 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D BUILD_SHARED_LIBS=ON\ -D BUILD_EXAMPLES=ON\ -D INSTALL_TESTS=ON\ - -D PYTHON_EXECUTABLE=$(which python3)\ + -D PYTHON3_EXECUTABLE=$(which python3)\ -D PYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ - -D PYTHON_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ - -D PYTHON3_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")\ + -D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ + -D PYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \ + -D PYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From 4204d5af1bc46c89217d704cbd37e58d7feed59d Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 17:14:09 +0800 Subject: [PATCH 32/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 660a0da..f23cb6e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -61,7 +61,7 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D PYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ -D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ -D PYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \ - -D PYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") + -D PYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From a9982b1092c4ee6cda9bd7e7b84450b0c2a0bfe4 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 17:17:23 +0800 Subject: [PATCH 33/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index f23cb6e..2a89a1e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -60,8 +60,8 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D PYTHON3_EXECUTABLE=$(which python3)\ -D PYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ -D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ - -D PYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \ - -D PYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") + -D PYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ + -D PYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))")\ -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From cac0bc8b5636e940487106675388e6d67059723b Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 18:01:36 +0800 Subject: [PATCH 34/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/opencv.spec b/opencv.spec index 2a89a1e..e0dc028 100644 --- a/opencv.spec +++ b/opencv.spec @@ -30,6 +30,7 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd +ll /usr/lib64/ | grep libpython %build mkdir -p cmake/build -- Gitee From 881212334ce77664809dd521b980d81bd8ce980f Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 18:16:11 +0800 Subject: [PATCH 35/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opencv.spec b/opencv.spec index e0dc028..c784fba 100644 --- a/opencv.spec +++ b/opencv.spec @@ -30,7 +30,7 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd -ll /usr/lib64/ | grep libpython +ls /usr/lib64 | grep libpython3 %build mkdir -p cmake/build @@ -62,7 +62,7 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D PYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ -D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ -D PYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ - -D PYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))")\ + -D PYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')/libpython3.so)")\ -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From b2555c2a8ea12776f3dd555a2c75228a81b59911 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 18:33:12 +0800 Subject: [PATCH 36/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/opencv.spec b/opencv.spec index c784fba..9d4b118 100644 --- a/opencv.spec +++ b/opencv.spec @@ -30,7 +30,6 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd -ls /usr/lib64 | grep libpython3 %build mkdir -p cmake/build @@ -61,8 +60,8 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D PYTHON3_EXECUTABLE=$(which python3)\ -D PYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ -D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ - -D PYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ - -D PYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')/libpython3.so)")\ + -D PYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ + -D PYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))+ '//libpython3.so'")\ -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From d88adb51f5ed2655bc7c005f82bb57466016ee02 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 18:38:17 +0800 Subject: [PATCH 37/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 9d4b118..54490ec 100644 --- a/opencv.spec +++ b/opencv.spec @@ -61,7 +61,7 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D PYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ -D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ -D PYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ - -D PYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))+ '//libpython3.so'")\ + -D PYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From 6cee5e1e2443082a2be377cd07a08c2780049bcc Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 18:55:39 +0800 Subject: [PATCH 38/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opencv.spec b/opencv.spec index 54490ec..77d99e4 100644 --- a/opencv.spec +++ b/opencv.spec @@ -62,6 +62,9 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ -D PYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ -D PYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ + -D PYTHON3_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ + -D PYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ + -D PYTHON_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ -D CMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From 7f3575d2d6f69b8f48a5b9c9bf5e3672749afcb2 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 19:29:42 +0800 Subject: [PATCH 39/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opencv.spec b/opencv.spec index 77d99e4..ddbeef4 100644 --- a/opencv.spec +++ b/opencv.spec @@ -30,6 +30,7 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd +ls -l /usr/include/python3.8 | grep Python %build mkdir -p cmake/build @@ -58,9 +59,11 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D BUILD_EXAMPLES=ON\ -D INSTALL_TESTS=ON\ -D PYTHON3_EXECUTABLE=$(which python3)\ + -D PYTHON_EXECUTABLE=$(which python3)\ -D PYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ -D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ -D PYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ + -D PYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ -D PYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ -D PYTHON3_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ -D PYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ -- Gitee From 1625ccbfe63a601cbd763bcee8f8732b3cd00747 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Wed, 17 Nov 2021 20:53:22 +0800 Subject: [PATCH 40/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/opencv.spec b/opencv.spec index ddbeef4..7baec86 100644 --- a/opencv.spec +++ b/opencv.spec @@ -17,6 +17,7 @@ Patch3: Repair_clang_abi.patch BuildRequires: gcc-c++ gcc autoconf pkgconfig protobuf-compiler protobuf BuildRequires: cmake BuildRequires: python3-numpy +BuildRequires: python3-devel %description OpenCV means Intel® Open Source Computer Vision Library. It is a collection of -- Gitee From 7e0ef912585a640ea389eb91a0713d65b6f8cd6c Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Thu, 18 Nov 2021 09:33:51 +0800 Subject: [PATCH 41/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 7baec86..e24937e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -31,7 +31,6 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd -ls -l /usr/include/python3.8 | grep Python %build mkdir -p cmake/build @@ -58,6 +57,7 @@ cmake ../../ -D CMAKE_BUILD_TYPE=Release\ -D BUILD_JASPER=OFF\ -D BUILD_SHARED_LIBS=ON\ -D BUILD_EXAMPLES=ON\ + -DOPENCV_TEST_DATA_PATH=%_builddir/%{name}-%{version}/opencv_extra-%{version}/testdata\ -D INSTALL_TESTS=ON\ -D PYTHON3_EXECUTABLE=$(which python3)\ -D PYTHON_EXECUTABLE=$(which python3)\ -- Gitee From bf043dc0064a689627d4e8c9c339a7e4a72d4f73 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Thu, 18 Nov 2021 12:12:44 +0800 Subject: [PATCH 42/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opencv.spec b/opencv.spec index e24937e..2dc4327 100644 --- a/opencv.spec +++ b/opencv.spec @@ -85,6 +85,8 @@ make install DESTDIR=%{buildroot} %{_libdir}/* %{_includedir}/* %exclude /usr/share/* +$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/cv2/* + %changelog * Wed Nov 17 2021 shenwei - 4.5.2-4 -- Gitee From 0b81cf1bb10fa1f4e81758b2699173b9bcb76882 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Thu, 18 Nov 2021 14:43:22 +0800 Subject: [PATCH 43/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 68 ++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/opencv.spec b/opencv.spec index 2dc4327..248a8c1 100644 --- a/opencv.spec +++ b/opencv.spec @@ -35,41 +35,41 @@ pwd %build mkdir -p cmake/build cd cmake/build -cmake ../../ -D CMAKE_BUILD_TYPE=Release\ - -D WITH_PROTOBUF=OFF\ - -D WITH_WEBP=OFF\ - -D WITH_IPP=OFF\ - -D WITH_ADE=OFF\ - -D BUILD_ZLIB=ON\ - -D BUILD_JPEG=ON\ - -D BUILD_PNG=ON\ - -D BUILD_OPENEXR=ON\ - -D BUILD_TESTS=ON\ - -D BUILD_PERF_TESTS=OFF\ - -D BUILD_opencv_apps=OFF\ - -D BUILD_opencv_python3=ON\ - -D BUILD_opencv_python2=OFF\ - -D BUILD_opencv_java=OFF\ - -D WITH_FFMPEG=OFF\ - -D WITH_TIFF=ON\ - -D BUILD_TIFF=OFF\ - -D WITH_JASPER=OFF\ - -D BUILD_JASPER=OFF\ - -D BUILD_SHARED_LIBS=ON\ - -D BUILD_EXAMPLES=ON\ +cmake ../../ -DCMAKE_BUILD_TYPE=Release\ + -DWITH_PROTOBUF=OFF\ + -DWITH_WEBP=OFF\ + -DWITH_IPP=OFF\ + -DWITH_ADE=OFF\ + -DBUILD_ZLIB=ON\ + -DBUILD_JPEG=ON\ + -DBUILD_PNG=ON\ + -DBUILD_OPENEXR=ON\ + -DBUILD_TESTS=ON\ + -DBUILD_PERF_TESTS=OFF\ + -DBUILD_opencv_apps=OFF\ + -DBUILD_opencv_python3=ON\ + -DBUILD_opencv_python2=OFF\ + -DBUILD_opencv_java=OFF\ + -DWITH_FFMPEG=OFF\ + -DWITH_TIFF=ON\ + -DBUILD_TIFF=OFF\ + -DWITH_JASPER=OFF\ + -DBUILD_JASPER=OFF\ + -DBUILD_SHARED_LIBS=ON\ + -DBUILD_EXAMPLES=ON\ -DOPENCV_TEST_DATA_PATH=%_builddir/%{name}-%{version}/opencv_extra-%{version}/testdata\ - -D INSTALL_TESTS=ON\ - -D PYTHON3_EXECUTABLE=$(which python3)\ - -D PYTHON_EXECUTABLE=$(which python3)\ - -D PYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ - -D PYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ - -D PYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ - -D PYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ - -D PYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ - -D PYTHON3_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ - -D PYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ - -D PYTHON_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ - -D CMAKE_INSTALL_PREFIX=/usr + -DINSTALL_TESTS=ON\ + -DPYTHON3_EXECUTABLE=$(which python3)\ + -DPYTHON_EXECUTABLE=$(which python3)\ + -DPYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\ + -DPYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\ + -DPYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ + -DPYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\ + -DPYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ + -DPYTHON3_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ + -DPYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ + -DPYTHON_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ + -DCMAKE_INSTALL_PREFIX=/usr make -j24 V=1 ctest -E "opencv_test_objdetect" -- Gitee From 04a1911f876518a2b292dab00d64d095dcf73314 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Thu, 18 Nov 2021 15:03:14 +0800 Subject: [PATCH 44/44] =?UTF-8?q?=E6=9E=84=E5=BB=BApython=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opencv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 248a8c1..5ffa66e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -85,7 +85,7 @@ make install DESTDIR=%{buildroot} %{_libdir}/* %{_includedir}/* %exclude /usr/share/* -$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/cv2/* +/usr/lib/python3.8/site-packages/cv2/* %changelog -- Gitee