How does one meet a python2-devel dependency requirement on openSUSE-11.3

I’m trying to build the package gimagereader from tarball for my own PC. When I run the pre-requisite ‘make rpm’ command per the install.txt file, I obtain the error:

error: Failed build dependencies:
        python2-devel is needed by gimagereader-0.8.1-1%{dist}.noarch

I note a spec here which pretty much corresponds to it (not quite the same, but it has a similar requires section):
http://n.ethz.ch/~smani/download/gimagereader/gimagereader.spec
ie something like:

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildArch: noarch
BuildRequires: **python2-devel** gettext desktop-file-utils
Provides: %{name}-static = %{version}-%{release}
Requires: python tesseract ImageMagick pygtk2 pycairo gnome-python2-gtkspell ghostscript python-enchant python-imaging-sane pypoppler

Of course python2-devel is no where that I can find for openSUSE-11.3.

… I previously built gimagereader on openSUSE-11.2, but I don’t recall encountering this problem on 11.2. But I also had a lot more bloat on my 11.2 so possibly I never encountered this before because of the bloat.

Hi
Look at the spec file here;
https://build.opensuse.org/package/view_file?file=gimagereader.spec&package=gimagereader&project=home%3Ailfirin&srcmd5=4c3f55f99a79dbf6104c0d3bc3abd496

If you want I can build an updated package, python builds are pretty easy.

Here you go (had a few spare minutes :wink: )
software.opensuse.org: Search Results

It’s built so should be there soon;
https://build.opensuse.org/package/show?package=python-gimagereader&project=home%3Amalcolmlewis%3APython

Also note to meet python packaging requirements it has the python- added.

duplicate post

Wow, thanks malcolmlewis.

I installed your rpm and it works nicely. I also tested rebuilding from your .src file and that also works nicely.

I don’t understand what I was doing wrong. Was python2-devel not a needed dependency ? I did have python3-devel and python-devel installed, but neither of those would satisfy the python2-devel requirement.

I tested the gimagereader to take a scanned jpeg file of a page in french, and it scanned it to ascii. I don’t have the dictionary working (I also did not have it working when running gimagereader on openSUSE-11.2). But this time with your build I get more error messages (which could be helpful). I get the error:

oldcpu@core-i7:~/rpms> gimagereader
libenchant.so.1
Could not load dbus, find PackageKit on dbus or find apt-file: dictionary autoinstallation will not work.
libusb couldn't open USB device /dev/bus/usb/001/001: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/001/002: Permission denied.
libusb requires write access to USB device nodes.
........... etc ... with the libusb message repeating many times .....

… an ideas there ?

Of course I have dbus installed:

oldcpu@core-i7:~/rpms> rpm -qa '*dbus*'
libeggdbus-1-0-0.6-5.1.x86_64
dbus-1-32bit-1.2.24-1.18.x86_64
dbus-1-python-0.83.0-31.1.x86_64
dbus-1-glib-devel-0.86-1.19.x86_64
dbus-1-glib-0.86-1.19.x86_64
dbus-1-x11-1.2.24-1.10.x86_64
dbus-1-devel-1.2.24-1.18.x86_64
dbus-1-1.2.24-1.18.x86_64
yast2-dbus-client-2.18.0-5.1.x86_64
dbus-1-python-devel-0.83.0-31.1.x86_64

and all sorts of dictionaries:

oldcpu@core-i7:~/rpms> rpm -qa '*spell*'
hunspell-tools-1.2.8-8.1.x86_64
aspell-de-20091006-1.21.x86_64
gtkspell-lang-2.0.15-6.1.noarch
hunspell-1.2.8-8.1.x86_64
aspell-en-6.0-164.1.x86_64
ispell-american-3.3.02-90.1.x86_64
myspell-american-20100316-9.1.noarch
gtkspell-doc-2.0.15-6.1.x86_64
gtkspell-2.0.15-6.1.x86_64
gtkspell-devel-2.0.15-6.1.x86_64
aspell-fr-0.50.3-16.1.x86_64
ispell-3.3.02-90.1.x86_64
aspell-0.60.6-32.1.x86_64

and the tesseract rpms that I believe needed:

oldcpu@core-i7:~/rpms> rpm -qa '*tess*'
tesseract-data-fra-2.04-1.2.x86_64
tesseract-devel-2.04-1.2.x86_64
tesseract-data-deu-2.04-1.2.x86_64
tesseract-2.04-1.2.x86_64

My current thinking is I am missing a tesseract rpm (there are hundreds of those).

No worries if you have no hints there either. I’m back to where I was with my openSUSE-11.2 on this new 11.3 install, and I’m happy there.

Actually, I’m further ahead with openSUSE-11.3 and the gimagereader you built. Previous I was using verison 0.7 which could not control the scanner on its own. So I had to scan with xsane first. And then run gimagereader.

Version 0.8 will control the scanner itself allowing one to do such OCR more seemlessly.

I installed ispell-french-1.5-395.1.x86_64 and ispell-german-1.5-395.1.x86_64, and while I still get same error upon boot of gimagereader, I so not understand what the error is referring to, as the spell check works now ! For example, I note the spell check now works for French ! (I have not tested German). This version of gimagereader is MUCH nicer than the older version.

Many thanks.

Hi,
im the developer of gimagereader, Just a comment on the error: dbus + packagekit or apt-file are needed to offer the user to automatically install missing spellcheck dictionaries if they are not installed. From what I read openSuse is supposed to use packagekit, so it should actually work, but I’ve never tested it myself (currently only have fedora and ubuntu installs to test on).
Anyhow the relevant python lines which test if dbus+packagekit work are


import dbus
import dbus.mainloop.glib
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
obj=dbus.SessionBus().get_object('org.freedesktop.PackageKit', '/org/freedesktop/PackageKit')

If something needs to be done differently on opensuse I’d be happy to adapt the code for future releases.

Best,
Sandro

Thankyou for the visit and the input. I’m hoping malcomlewis or one of our other packagers who visit the forum will understand this better than I and can perhaps have a suggestion. I am willing to test, but the making of suggestions is beyond my technical competence in this field.

I do note on this 64-bit PC (referenced in this thread) I have installed a number of different ‘packagekits’:


oldcpu@core-i7:~> rpm -qa '*ackage*'
yast2-packager-2.19.7-1.5.x86_64
jpackage-utils-1.7.5-19.1.x86_64
kupdateapplet-packagekit-0.9.17-1.5.x86_64
PackageKit-branding-openSUSE-11.3-2.11.noarch
PackageKit-devel-0.6.3-5.4.noarch
yast2-metapackage-handler-0.8.10-3.2.noarch
PackageKit-gtk-module-0.6.3-5.4.x86_64
PackageKit-gstreamer-plugin-0.6.3-5.4.x86_64
PackageKit-0.6.3-5.4.x86_64
PackageKit-browser-plugin-0.6.3-5.4.x86_64
libpackagekit-glib2-devel-0.6.3-5.4.x86_64
libpackagekit-glib2-14-0.6.3-5.4.x86_64

and for dbus I have these apps:

oldcpu@core-i7:~> rpm -qa '*dbus*'
libeggdbus-1-0-0.6-5.1.x86_64
yast2-dbus-server-2.18.1-6.1.x86_64
dbus-1-32bit-1.2.24-1.18.x86_64
dbus-1-python-0.83.0-31.1.x86_64                                                                                                                                                           
dbus-1-glib-devel-0.86-1.19.x86_64
dbus-1-glib-0.86-1.19.x86_64                                                                                                                                                               
dbus-1-x11-1.2.24-1.10.x86_64
dbus-1-devel-1.2.24-1.18.x86_64
dbus-1-1.2.24-1.18.x86_64
yast2-dbus-client-2.18.0-5.1.x86_64
dbus-1-python-devel-0.83.0-31.1.x86_64

There are other dbus apps available for openSUSE, and my knowledge is not good enough to know if I am simply missing one of them, or if possibly gimagereader was built (and also rebuilt by me with malcomlewis’ rpm spec file) without the correct devel apps in place.

I do note on another thread that I have had success with gimagereader on two other openSUSE-11.3 PC’s with different hardware: OCR and Linux

  • post#10 in that threadalso refers to the success noted here in this current thread with malcomlewis’ package of your gimagereader , running on a 64-bit openSUSE-11.3 KDE-4.4.4 on an Intel Core i7 w/6GB RAM
  • post # 14 in that thread refers to the success with malcomlewis’ package of your gimagereader, running on a 32-bit openSUSE-11.3 LXDE desktop on a 32-bit Athlon-1100 w/1GB RAM
  • post#15 in that thread refers to the success with malcomlewis’ package of your gimagereader, running on a 32-bit openSUSE-11.3 KDE-4.4.4 desktop on a 32-bit Athlon-2800 w/2GB RAM. What is useful of that post is I actually tried to list the openSUSE dependencies that I could think of (and of course I probably got a large % of my dependency guessing wrong, with me likely listing more than necesary).

gimagereader is a very useful package for me that I use two to three times/week.

Thankyou for packaging it.

Hi Sandro
I’m the user who has packaged up the latest version in my home
repository. I’ve added tyour requires from the Fedora spec and have
also added the noupdate check patch (https://bugzilla.redhat.com/show_bug.cgi?id=653917)
and will rebuild and see if that make a difference. If not will
investigate further with some of the openSUSE packagers and push any
updates through to you on sourceforge


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.24-0.2-default
up 20:40, 3 users, load average: 0.13, 0.20, 0.14
GPU GeForce 8600 GTS Silent - Driver Version: 260.19.29

Hi Malcolm,

I can test on a few different PCs (with different desktops and architectures) when the new build is available.

Hi
There is also gnome-packagekit, which according to here is needed;
http://www.packagekit.org/pk-download.html


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.24-0.2-default
up 21:05, 2 users, load average: 0.15, 0.11, 0.09
GPU GeForce 8600 GTS Silent - Driver Version: 260.19.29

gnome-packagekit is just the gnome front-end, and should not be necessary. What happens when you enter the commands I listed in my previous post in an interactive python shell? Should be pretty easy to find the cause of the issue based on the results of those commands.
Best,
Sandro

I installed your latest package of python-gimagereader-0.8.1-3.1.mjl.noarch on my 32-bit athlon-2800 w/2GB RAM running 32-bit openSUSE-11.3 KDE-4.4.4, and I no longer obtain the error message:

Could not load dbus, find PackageKit on dbus or find apt-file: dictionary autoinstallation will not work.
libusb couldn't open USB device /dev/bus/usb/001/001: Permission denied.
libusb requires write access to USB device nodes 

Here are some screen images of the updated install (and additional dependencies picked up with this updated version) and then images of gimagereader running:

… YaST showing the additional dependencies:
http://thumbnails10.imagebam.com/11444/8de20c114436913.jpg](http://www.imagebam.com/image/8de20c114436913)

and another YaST view:
http://thumbnails7.imagebam.com/11444/fcbad1114436920.jpg](http://www.imagebam.com/image/fcbad1114436920)

and gimagereader running (started from konsole) with this latest packaged version … note the konsole behind with no error messages:
http://thumbnails35.imagebam.com/11444/45f967114436926.jpg](http://www.imagebam.com/image/45f967114436926)

and another view of gimager reader showing some of the French language dictionaries that I had installed previous BEFORE this update of the package:
http://thumbnails13.imagebam.com/11444/9b6661114436933.jpg](http://www.imagebam.com/image/9b6661114436933)

… so no more errors, but because I already have the dictionaries installed, I could not observe gimagereader prompt for additional dictionaries.

I still have three more PCs in the apartment that don’t have gimagereader : an openSUSE-11.1 laptop running a 32-bit Gnome (support may have stopped for that already in the build service - not sure if Evergreen has managed to delay that support stoppage), and an openSUSE-11.3 laptop running a 64-bit KDE-4.4.4 (a Dell Studio 1537). The 3rd is my wife’s PC (ie access by me is limited). Later this week I’ll try install gimagereader on the Dell Studio 1537 laptop and see how the dependencies are picked up and see how gimagereader functions wrt picking up dictionaries.

Thank-you Sandro for the development and thank-you Malcolm for the packaging.

Hi
Just tested in a test VM and it works fine;


malcolml@linux-6bqy:~> python
Python 2.6.5 (r265:79063, Jul  5 2010, 11:46:13)
[GCC 4.5.0 20100604 [gcc-4_5-branch revision 160292]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import dbus
>>> import dbus.mainloop.glib
>>> dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
<dbus.mainloop.NativeMainLoop object at 0x7f0e4c826cf0>
>>> obj=dbus.SessionBus().get_object('org.freedesktop.PackageKit',
>>> '/org/freedesktop/PackageKit') exit()

Do you think the noupdate patch caused the initial error?

I’ve also removed the gnome-packagekit requires, so all looks good.
The source and build logs are here;
https://build.opensuse.org/package/show?package=python-gimagereader&project=home%3Amalcolmlewis%3APython


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.24-0.2-default
up 22:22, 2 users, load average: 0.24, 1.08, 0.78
GPU GeForce 8600 GTS Silent - Driver Version: 260.19.29

No that’s quite impossible - the patch simply makes a widget insensitive and sets one boolean to false. It’s more likely that a package you installed in the meantime settled the problem: does a stock openSuse come with packagekit installed and configured by default?
Best,
Sandro

Hi Sandro
Yes it’s there, now that’s a Gnome default install, so it may be different for KDE and others, I would need to check a KDE4 install.

But looks like it’s good now, thanks for the help :slight_smile: