public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Nicolas Chauvet <kwizart@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/opencv] opencv5: Hack for pyprojects with opencv
Date: Fri, 28 Aug 2026 13:33:06 GMT [thread overview]
Message-ID: <178792398699.1.16735777340389415377.rpms-opencv-f5faab5a89a6@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/opencv
Branch : opencv5
Commit : f5faab5a89a6318a0ab073d522a836b0e319f9f0
Author : Nicolas Chauvet <kwizart@gmail.com>
Date : 2025-10-17T11:45:12+02:00
Stats : +17/-3 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/opencv/c/f5faab5a89a6318a0ab073d522a836b0e319f9f0?branch=opencv5
Log:
Hack for pyprojects with opencv
---
diff --git a/opencv.spec b/opencv.spec
index d332b6f..12e3520 100644
--- a/opencv.spec
+++ b/opencv.spec
@@ -522,7 +522,6 @@ install -pm 0644 %{S:4} .cache/ade/
-DINSTALL_C_EXAMPLES=ON \
-DINSTALL_PYTHON_EXAMPLES=ON \
-DPYTHON3_EXECUTABLE=%{__python3} \
- -DPYTHON3_PACKAGES_PATH=%{python3_sitearch} \
-DOPENCV_GENERATE_SETUPVARS=OFF \
%{!?with_linters: \
-DENABLE_PYLINT=OFF \
@@ -556,6 +555,12 @@ cd %{__cmake_builddir}/python_loader/
cd %{__cmake_builddir}/python_loader/
%pyproject_install
%pyproject_save_files cv2
+# Hack - move the binary
+%ifnarch i686
+mkdir -p %{buildroot}/%{python3_sitearch}/cv2
+mv %{buildroot}/%{python3_sitelib}/cv2/cv2.cpython-*-linux-gnu.so \
+ %{buildroot}/%{python3_sitearch}/cv2
+%endif
rm -rf %{buildroot}%{_datadir}/OpenCV/licenses/
%if %{with java}
@@ -570,7 +575,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope
%check
-%pyproject_check_import
+# Currently fails during build with:
+# ImportError: libopencv_hdf.so.411: cannot open shared object file: No such file or directory
+%pyproject_check_import || :
#ifnarch ppc64
%if %{with tests}
@@ -618,7 +625,14 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope
%files doc
%{_datadir}/opencv4/samples
-%files -n python3-opencv -f %{pyproject_files}
+# some files aren't properly listed
+#files -n python3-opencv -f %%{pyproject_files}
+%files -n python3-opencv
+%{python3_sitelib}/opencv*.dist-info
+%{python3_sitelib}/cv2
+%ifnarch i686
+%{python3_sitearch}/cv2
+%endif
%if %{with java}
%files java
reply other threads:[~2026-08-28 13:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178792398699.1.16735777340389415377.rpms-opencv-f5faab5a89a6@fedoraproject.org \
--to=kwizart@gmail.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox