Bug 233128

Summary: opencv-python package bug on x86_64
Product: [Fedora] Fedora Reporter: Scott Tsai <scottt.tw>
Component: opencvAssignee: Ralf Corsepius <rc040203>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: a.badger, nomis80, ville.skytta
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-03-22 05:45:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Scott Tsai 2007-03-20 15:56:45 UTC
Description of problem:
Putting _cv.so, _highgui.so under /usr/lib64/ while the rest of opencv-python is
under /usr/lib doesn't work.

Version-Release number of selected component (if applicable):
opencv-python-1.0.0-1.fc6

How reproducible:
always

Steps to Reproduce:
1. yum -y install opencv-python
2. python /usr/share/opencv/samples/python/convexhull.py
  
Actual results:
OpenCV Python version of convexhull
Traceback (most recent call last):
  File "/usr/share/opencv/samples/python/convexhull.py", line 6, in ?
    from opencv import cv
  File "/usr/lib/python2.4/site-packages/opencv/__init__.py", line 55, in ?
    from cv import *
  File "/usr/lib/python2.4/site-packages/opencv/cv.py", line 5, in ?
    import _cv
ImportError: No module named _cv

Expected results:
"OpenCV Python version of convexhull" on stdout and a graphical window showing a
convex hull.


Additional info:
cp -a /usr/lib64/python2.4/site-packages/opencv/*
/usr/lib/python2.4/site-packages/opencv/
And the test case will work.

I believe the fedora python packaging guidlines addresses this "some package
don't like different 'site_lib' 'site_arch' problem"?

Comment 1 Ralf Corsepius 2007-03-21 05:36:12 UTC
Ville, Toshio - any insights about what be going wrong here?

Moving lib64 compiled binaries to /usr/lib/* doesn't sound right to me.

Unfortunately I don't have access to x86_64 systems and can't test this issue,
nor am I a python specialist.


Comment 2 Toshio Kuratomi 2007-03-21 21:18:53 UTC
Moving all the python files under %{_libdir} would be correct.

python can load a package from only one directory.  So if part of the python
package is compiled to object code, then all of the module needs to go under
%{python_sitearch}  (%{pyexecdir} in your spec file)

Comment 3 Ralf Corsepius 2007-03-22 03:38:52 UTC
(In reply to comment #2)
> Moving all the python files under %{_libdir} would be correct.
> 
> python can load a package from only one directory.  So if part of the python
> package is compiled to object code, then all of the module needs to go under
> %{python_sitearch}  (%{pyexecdir} in your spec file)

"All of the module" or all "python file"?

opencv-python consists of 2 parts: a "module" and a set of "sample applications" 
Are you saying both must be moved under %_libdir?

As the next step, I'be trying to move all of the module under %_libdir, but keep
the applications under /usr/share.

Comment 4 Ralf Corsepius 2007-03-22 05:45:48 UTC
I hope to have fixed this issue in *-1.0.0-3, which should be available for fc6
and fc7 with next spin of packages.