From 29d1b058541d294aaca150608ee2924731708b1a Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Thu, 18 Nov 2021 19:56:19 +0800 Subject: [PATCH 01/10] =?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 b838d3e..57221d7 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 + %description OpenCV means Intel® Open Source Computer Vision Library. It is a collection of C functions and a few C++ classes that implement some popular Image Processing -- Gitee From 96440a24f8bf3ea63fe11a39c35853d48d14486c Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Thu, 18 Nov 2021 20:28:39 +0800 Subject: [PATCH 02/10] =?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 57221d7..22e8ba5 100644 --- a/opencv.spec +++ b/opencv.spec @@ -16,7 +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-devel python3-numpy %description OpenCV means Intel® Open Source Computer Vision Library. It is a collection of -- Gitee From b91121245fb1fe93da10597931f094b54a30dcfd Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Thu, 18 Nov 2021 23:28:49 +0800 Subject: [PATCH 03/10] =?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 22e8ba5..4eecffb 100644 --- a/opencv.spec +++ b/opencv.spec @@ -16,7 +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-devel python3-numpy +BuildRequires: python3-devel %description OpenCV means Intel® Open Source Computer Vision Library. It is a collection of -- Gitee From 33063489eb339570e8be877b59d5f7b3c4d1ec86 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Fri, 19 Nov 2021 00:12:51 +0800 Subject: [PATCH 04/10] =?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 4eecffb..32f275f 100644 --- a/opencv.spec +++ b/opencv.spec @@ -16,7 +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-devel +BuildRequires: python3-numpy %description OpenCV means Intel® Open Source Computer Vision Library. It is a collection of -- Gitee From 86b1ff8b146286b6d9c89c08d8f7eec5cef95f82 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Fri, 19 Nov 2021 00:32:26 +0800 Subject: [PATCH 05/10] =?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 32f275f..6abe0fc 100644 --- a/opencv.spec +++ b/opencv.spec @@ -16,7 +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 +BuildRequires: python3-numpy python3-devel %description OpenCV means Intel® Open Source Computer Vision Library. It is a collection of -- Gitee From e9592a0eaaf7648cadf9d0eb77dac3ec774c5909 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Fri, 19 Nov 2021 01:05:02 +0800 Subject: [PATCH 06/10] =?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 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index 6abe0fc..a659f3f 100644 --- a/opencv.spec +++ b/opencv.spec @@ -47,6 +47,8 @@ cmake ../../ -DCMAKE_BUILD_TYPE=Release\ -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\ @@ -56,9 +58,19 @@ cmake ../../ -DCMAKE_BUILD_TYPE=Release\ -DBUILD_EXAMPLES=ON\ -DOPENCV_TEST_DATA_PATH=%_builddir/%{name}-%{version}/opencv_extra-%{version}/testdata\ -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" +ctest -E "opencv_test_python" %install -- Gitee From 6379450e07693f769aa67bb349f1f0501478b619 Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Fri, 19 Nov 2021 09:02:21 +0800 Subject: [PATCH 07/10] =?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 a659f3f..ea8fd65 100644 --- a/opencv.spec +++ b/opencv.spec @@ -70,7 +70,7 @@ cmake ../../ -DCMAKE_BUILD_TYPE=Release\ -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_python" +ctest -E "opencv_test_imgproc" %install -- Gitee From fdd10b3d53e15cee50b8f4837f344b3a2106571e Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Fri, 19 Nov 2021 10:00:25 +0800 Subject: [PATCH 08/10] =?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, 2 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index ea8fd65..dab493e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -70,7 +70,7 @@ cmake ../../ -DCMAKE_BUILD_TYPE=Release\ -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_imgproc" +ctest -E "opencv_test_objdetect opencv_test_photo" %install @@ -84,6 +84,7 @@ make install DESTDIR=%{buildroot} %{_libdir}/* %{_includedir}/* %exclude /usr/share/* +/usr/lib/python3.8/site-packages/cv2/* %changelog * Wed Nov 17 2021 shenwei - 4.5.2-4 -- Gitee From e897938ba4bb42210aa5f2cd86c00bb80ed8e72c Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Fri, 19 Nov 2021 10:48:01 +0800 Subject: [PATCH 09/10] =?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 dab493e..80c5a1f 100644 --- a/opencv.spec +++ b/opencv.spec @@ -70,7 +70,7 @@ cmake ../../ -DCMAKE_BUILD_TYPE=Release\ -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 opencv_test_photo" +ctest -E "opencv_test_objdetect" "opencv_test_photo" %install -- Gitee From a7b39b98019c98d662b1e1446c3194593c4f2cfd Mon Sep 17 00:00:00 2001 From: yanhailiang Date: Fri, 19 Nov 2021 10:56:48 +0800 Subject: [PATCH 10/10] =?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 80c5a1f..5569258 100644 --- a/opencv.spec +++ b/opencv.spec @@ -70,7 +70,7 @@ cmake ../../ -DCMAKE_BUILD_TYPE=Release\ -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" "opencv_test_photo" +ctest -E "opencv_test_objdetect|opencv_test_photo" %install -- Gitee