Trying to build RPM, missing pyqt4-devel

I have a spec file that calls for PyQt4-devel. I can’t find this and I’m thinking openSUSE doesn’t call it that. My evidence is that it also called for PyQt4 but as far as I can tell this is called python-qt4 in the repos. Is this correct? If so, what name am I suppose to give for PyQt4-devel instead?

This is the list of requirements in the file:
BuildRequires: python-devel, python-setuptools, python-sqlalchemy
BuildRequires: PyQt4-devel
BuildRequires: desktop-file-utils
Requires: qt4, PyQt4
Requires: python-sqlalchemy, python-simplejson, python-sqlite2
Requires: numpy
Requires: pygame

In my edit I’ve changed PyQt4 to python-qt4 which doesn’t cause any problems when I attempt to build the RPM. However, there is no python-qt4-devel (and, obviously, no PyQt4-devel). What am I suppose to use?
-Mathew

FWIW, this is the entire spec file:
%{!?python_sitelib: %define python_sitelib %(%{__python} -c “from distutils.sysconfig import get_python_lib; print get_python_lib()”)}

Name: anki
Version: 0.9.9.6
Release: 3%{?dist}
Summary: Flashcard program for using space repetition learning

Group: Amusements/Games
License: GPLv3+ and MIT
URL: Anki - a friendly, intelligent spaced learning system
Source0: %{name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python-devel, python-setuptools, python-sqlalchemy
BuildRequires: PyQt4-devel
BuildRequires: desktop-file-utils
Requires: qt4, PyQt4
Requires: python-sqlalchemy, python-simplejson, python-sqlite2
Requires: numpy
Requires: pygame
BuildArch: noarch

%description
Anki is a program designed to help you remember facts (such as words
and phrases in a foreign language) as easily, quickly and efficiently
as possible. Anki is based on a theory called spaced repetition.

%prep
%setup -q

%build
pushd libanki
%{__python} setup.py build
popd

%{__python} setup.py build

%install
rm -rf %{buildroot}
pushd libanki
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
popd

%{__python} setup.py install -O1 --skip-build --root %{buildroot}

install -d %{buildroot}%{_datadir}/applications
desktop-file-install
–remove-category=KDE
–dir %{buildroot}%{_datadir}/applications
%{name}.desktop

install -d %{buildroot}%{_datadir}/pixmaps
install -m 644 icons/anki.png %{buildroot}%{_datadir}/pixmaps/

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc COPYING ChangeLog CREDITS README*

libankiqt

%dir %{python_sitelib}/ankiqt
%{python_sitelib}/ankiqt/.py
%{python_sitelib}/ankiqt/ui
%{python_sitelib}/ankiqt/forms

libanki

%dir %{python_sitelib}/anki
%{python_sitelib}/anki/.py
%{python_sitelib}/anki/importing
%{python_sitelib}/anki/features

locale

%dir %{python_sitelib}/ankiqt/locale/
%dir %{python_sitelib}/anki/locale/
%lang(cs) %{python_sitelib}//locale/cs_/
%lang(de) %{python_sitelib}//locale/de_/
%lang(es) %{python_sitelib}//locale/es_/
%lang(fi) %{python_sitelib}//locale/fi_/
%lang(fr) %{python_sitelib}//locale/fr_/
%lang(it) %{python_sitelib}//locale/it_/
%lang(ja) %{python_sitelib}//locale/ja_/
%lang(ko) %{python_sitelib}//locale/ko_/
%lang(pl) %{python_sitelib}//locale/pl_/
%lang(zh) %{python_sitelib}/anki/locale/zh_*/

%{python_sitelib}/*egg-info
%{_bindir}/anki
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%changelog

  • Tue Mar 03 2009 Demetris Karagiannis <dekacy10@yahoo.com> 0.9.9.6-3 Created spec file for source build

Hi
From the source file readme;


Anki
-------------------------------------

Prerequisites:

- a recent python (2.4 should be fine)
- python-qt/pyqt 4.4+
- sqlalchemy 0.4.1+
- simplejson 1.7.3+
- pysqlite2 1.3+ or python2.5

For graph generation:

- python-numpy (numpy)
- python-matplotlib (matplotlib)

For audio playing support:

- mplayer on Windows/Linux (Mac uses native libraries)

For audio recording support:

- sox
- pyaudio
- lame

For furigana generation:

- kakasi

Looks like you just need python-qt4 and the others.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 (i586) Kernel 2.6.27.19-3.2-pae
up 3:51, 1 user, load average: 0.61, 0.46, 0.44
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

Thanks for that. Looks like everything is there but now I’m getting the following:

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.12125
+ umask 022
+ cd /usr/src/packages/BUILD
+ cd /usr/src/packages/BUILD
+ rm -rf anki-0.9.9.6
+ /usr/bin/gzip -dc /usr/src/packages/SOURCES/anki-0.9.9.6.tgz
+ tar -xf -
+ STATUS=0
+ '' 0 -ne 0 ']'
+ cd anki-0.9.9.6
++ /usr/bin/id -u
+ '' 1000 = 0 ']'
++ /usr/bin/id -u
+ '' 1000 = 0 ']'
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ $'\r'
: command not found125: line 33:
error: Bad exit status from /var/tmp/rpm-tmp.12125 (%prep)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.12125 (%prep)

Line 33 of the spec file? That’s just %{__python} setup.py build. I’m not familiar with python too much but I would think that it includes such a file, no?

Hi
Just change it to python instead.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 (i586) Kernel 2.6.27.19-3.2-pae
up 4:37, 2 users, load average: 0.79, 0.57, 0.43
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

Tried it. Same error.

Hi
What about the full path to python?
/usr/bin/python

Also do you have python-devel and python-setuptools?


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 (i586) Kernel 2.6.27.19-3.2-pae
up 5:06, 2 users, load average: 0.26, 0.44, 0.42
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME