[PyKDE] distutils for SIP extensions (=Help needed with SIP)
gvermeul at labs.polycnrs-gre.fr
gvermeul at labs.polycnrs-gre.fr
Wed Aug 22 13:46:47 BST 2001
Hello Jon,
Thanks for trying, it does indeed not work because you did not apply the
patch.
> Hello Gerard
>
> I upgraded to PyQt 2.5 and SIP 2.5. Heres what I got.
>
[...]
> "MMM/sip_helper" has made "MMM/sipMMMVersion.h"
> g++ -E -I/usr/include/python2.1 -o MMM/moc_sipMMMProxyMMM.h
> g++: No input files
> error: command 'g++' failed with exit status 1
>
This is due to the distutils.UnixCCompiler.preprocess() bug
[...]
>
> [john at localhost PyMMM-0.0.1]$ python examples/xmmm.py
> Traceback (most recent call last):
> File "examples/xmmm.py", line 17, in ?
> from MMM import *
> ImportError: No module named MMM
>
Of course, it does not work because the build_ext failed
[...]
>
> You said the readme explains the patch. It mentions a patch but does not say what to do
to
apply it. I have not been doing Linux for long so I need dummy instructions for this ?
>
Oh, sorry, I assumed that you knew how to apply the patch. In fact all
information is in the patch. A patch is human readible.
I would proceed like this (assuming that you are in the directory containing
Python-2.1.1.patch):
cp /usr/lib/python2.1/distutils/unixccompiler.py .
patch -p5 -b -z .distutils <Python-2.1.1.patch
This backs up unixccompiler.py by appending .distutils and creates a new
patched unixccompiler (compare the preprocess() functions in the two files).
Then, become root and copy the files to /usr/lib/python2.1/distutils/
cp unixccompiler.py* /usr/lib/python2.1/distutils/
If you are BRAVE, like to live DANGEROUSLY and REALLY TRUST me, you
could become root and do from the same directory
(do man patch to see the meaning of the -p switch and look at the patch
with a text editor)
patch <Python-2.1.1.patch
(I do not even trust myself).
Now, I have a workaround (the call to preprocess() is not really necessary).
See (within one hour):
ftp://old-labs.polycnrs-gre.fr/pub/SAS/Vermeulen/PyMMM-0.0.2.tar.gz
I going to make it as general as possible, so that the same distutils-based
tools can build/install PyQt, PyQtgl, PyQwt and ..., with as little editing
as possible. I hope it will also work on Windows (testers are welcome,
since I have no MicroSoft Visual C).
Gerard
---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/
More information about the PyQt
mailing list