[PyKDE] Pb building PyQt/PyKDE
Gerard Vermeulen
gvermeul at grenoble.cnrs.fr
Mon Sep 9 13:34:01 BST 2002
On Mon, Sep 09, 2002 at 09:25:57AM +0200, Jerome Martin wrote:
> Hi,
>
> I'm trying to build PyQt-3.3 on Mandrake8.2. I have tried the following
> command:
>
> 'python build.py -q /usr/lib/qt3 -b /home/jerome/rpm/tmp/PyQt-buildroot -l
> qt-mt -m /usr/bin/make'
>
> and got the message :
>
> "
> ****************************************************************************
> **
> Generating the C++ source for the qt module.
> ****************************************************************************
> **
> ****************************************************************************
> **
> Error: /home/jerome/rpm/BUILD/PyQt-3.3/sip failed with an exit code of 127.
> ****************************************************************************
> **'
>
> If I use the option " -b /usr/bin", it succeed in creating make file but it
> fail in make because it try to copy files in /usr/ and I was to logged as
> root.
>
> Few weeks ago, I saw a thread about this subject but at this date I was not
> interested by this.
> Some one send also a patch for build.py but I failed in patching it.
>
> Thx
>
> Jerome
I had the same problem, and fixed with this patch:
--- PyQt-3.3.2/build.py.mgv Fri Jul 12 15:04:53 2002
+++ PyQt-3.3.2/build.py Thu Jul 18 19:57:10 2002
@@ -918,9 +918,10 @@
# Use the basename to avoid problems with pathnames containing spaces.
argv.insert(0,os.path.basename(prog))
+## try:
+## rc = os.spawnv(os.P_WAIT,prog,argv)
+## except AttributeError:
try:
- rc = os.spawnv(os.P_WAIT,prog,argv)
- except AttributeError:
rc = os.system(string.join(argv))
except:
raise
I have bad experience with os.spawn* (ended up in looking in the
source code instead of the unclear documentation).
Maybe using import distutils.spawn if present is better.
Gerard
PS: I attach my spec file, gives an idea how to build a Mandrake
RPM without having root privileges
-------------- next part --------------
%define pyver 2.2.1
%define pydir 2.2
%define name PyQt
%define version 3.3.2
%define release 1mgv
%define qtdir /usr/lib/qt3
#%%define qtdir /usr/lib/qt2
Summary: Python bindings for Qt.
Name: %{name}
Version: %{version}
Release: %{release}
Copyright: GPL-like
Group: Development/Python
Source: http://www.riverbankcomputing.uk.co/PyQt/%{name}-%{version}.tar.bz2
Patch: %{name}-%{version}-%{release}.patch
URL: http://www.thekompany.com/projects
BuildRoot: %{_tmppath}/%{name}-buildroot
BuildRequires: sip = %{version}, python = %{pyver}
BuildRequires: libMesaGLU1-devel
Requires: python = %{pyver}, sip = %{version}
%description
Python bindings for the Qt C++ class library. Also includes a PyQt backend
code generator for Qt Designer and a debugger and the SIP specification files
for the Qt class library.
%prep
%setup -n %{name}-%{version}
%patch -p1 -b .mgv
%build
rm -rf %{buildroot}
mkdir -p %{buildroot}/%{_libdir}/python%{pydir}/site-packages
python build.py \
-b %{buildroot}/%{_bindir} \
-d %{buildroot}/%{_libdir}/python%{pydir}/site-packages \
-q %{qtdir}
make
%install
make install
make install-eric
mkdir -p %{buildroot}/%{_datadir}/sip/qt
cd sip
for f in *.sip; do
install -m 644 $f %{buildroot}/%{_datadir}/sip/qt
done
%clean
#rm -rf %{buildroot}
%files
%defattr(-, root, root)
%doc ChangeLog LICENSE NEWS README* THANKS doc/PyQt examples3
%{_bindir}/*
%{_datadir}/sip/qt
%{_libdir}/python%{pydir}/site-packages/eric
%{_libdir}/python%{pydir}/site-packages/libqtcanvascmodule.so*
%{_libdir}/python%{pydir}/site-packages/libqtcmodule.so*
%{_libdir}/python%{pydir}/site-packages/libqtglcmodule.so*
%{_libdir}/python%{pydir}/site-packages/libqtnetworkcmodule.so*
%{_libdir}/python%{pydir}/site-packages/libqtsqlcmodule.so*
%{_libdir}/python%{pydir}/site-packages/libqttablecmodule.so*
%{_libdir}/python%{pydir}/site-packages/libqtxmlcmodule.so*
%{_libdir}/python%{pydir}/site-packages/qt.py*
%{_libdir}/python%{pydir}/site-packages/qtcanvas.py*
%{_libdir}/python%{pydir}/site-packages/qtgl.py*
%{_libdir}/python%{pydir}/site-packages/qtnetwork.py*
%{_libdir}/python%{pydir}/site-packages/qtsql.py*
%{_libdir}/python%{pydir}/site-packages/qttable.py*
%{_libdir}/python%{pydir}/site-packages/qtxml.py*
%changelog
* Wed May 29 2002 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 3.3.2-1mgv
- 3.3.2 on Mandrake-8.2 with Qt-3.0.4
* Sun May 19 2002 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 3.2.4-4mgv
- 3.2.4 on Mandrake-8.2
- zap %{_includedir}/python%{pydir}/sipQtFeatures.h (fixed PyQwt)
* Mon May 13 2002 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 3.2.2-3mgv
- 3.2.2 on Mandrake-8.2
* Thu May 09 2002 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 3.2-2mgv
- add %{_includedir}/python%{pydir}/sipQtFeatures.h for development
* Wed May 08 2002 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 3.2-1mgv
- 3.2 on Mandrake-8.2 with Qt-2.3.1
- disable modules: Palmtop, SQL
* Wed Nov 28 2001 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 3.0-1mgv
- 3.0
* Thu Oct 4 2001 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 2.5-4mgv
- merge PyQt and PyQt-devel (undo Mandrake split of package)
* Mon Aug 27 2001 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 2.5-3mgv
- python-2.1.1
* Thu Aug 16 2001 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 2.5-2mgv
- %%{name}-%%{version}-Qt-%%{qtver}.tar.bz2
- version 2.5
* Sat Jun 9 2001 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 2.5-1mgv
- have to install libqtglcmodule-2.5.so manually
- make sip(qt|qtgl)Version.h first, because build chokes on my SMP machine
- version 2.5pre1
* Mon May 28 2001 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 2.4-6mgv
- remove *.la, because C++ static constructors and libtool-1.4...
* Sun May 27 2001 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 2.4-5mgv
- build with libtool-1.4 exposed bug in sip.spec: CHECK paths in *.la files
* Mon Apr 23 2001 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 2.4-4mgv
- 2.4
* Thu Apr 10 2001 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 2.4-3mgv
- 2.4pre2
* Fri Apr 06 2001 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 2.4-2mgv
- merge David BAUDENS split of sip into sip, libsipMAJOR and libsipMAJOR-devel
- tweak BuildRequires and Requires
* Sun Mar 25 2001 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 2.4-1mgv
- 2.4pre1 for python-2.1
* Sun Feb 04 2001 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 2.3-2mgv
- tweak %%files
* Tue Oct 10 2000 Gerard Vermeulen <gvermeul at polycnrs-gre.fr> 2.2-1mgv
- mandrakization for 7.2
# EOF
More information about the PyQt
mailing list