On 18. 02. 22 1:37, Sérgio Basto wrote:
Hi,
Can someone help me ?
https://src.fedoraproject.org/rpms/opencv/blob/rawhide/f/opencv.spec
have py_provides but
https://bugzilla.redhat.com/show_bug.cgi?id=2054951

Hi Sérgio,

for some reason, you message ended in my Spam box. Sorry for a delayed response.

First of all, %py_provides has nothing to do with python3dist(opencv-python) Provides.

%py_provides takes a given *alternative* name (such as python3-opencv) and turns it into other names (such as python-opencv and python3.10-opencv). On a package already named python3-opencv, you don't need to use %py_provides, it does nothing.

OTOH python3dist(opencv-python) would only be generated if the package actually provided a Python opencv-python package, in a Python sense. I.e. when you dnf install python3-opencv and run "pip list", do you see opencv-python listed? If you do, but the python3dist(opencv-python) provide is missing, there is bug in our generators. If you don't see opencv-python listed, the package MUST NOT provide python3dist(opencv-python). The provide literally means "Python tools will consider this package is opencv-python".

Looking at the linked bugzilla, it seems to me that the package provides no Python metadata at all, only the importable module:

/usr/lib64/python3.10/site-packages/cv2.cpython-310-x86_64-linux-gnu.so

In order to provide the actual metadata you would need to create and install dist-info/egg-info directory.

However, it appears to me that the opencv-python package is actually https://github.com/opencv/opencv-python and not what we are shipping in Fedora as python3-opencv.

This is a weird variant of a missing dependency. In Fedora, we don't package opencv-python at all. Packages that require python3dist(opencv-python) have a missing dependency. But that dependency can be technically substituted by our pytohn3-opencv package, however that requires patching the dependent package not to require opencv-python and instead add the dependency for python3-opencv on the RPM level manually.

Alternatively, we could package opencv-python to Fedora and patch it to require and use python3-opencv, to avoid bundling/duplication.

Either way, there is no easy solution, this is where the Python ecosystem clashes with the RPM ecosystem instead of cooperating.

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to