[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] Conditional SIP processing based on the PyQt version
From:       Gerard Vermeulen <gvermeul () grenoble ! cnrs ! fr>
Date:       2004-01-23 8:26:26
Message-ID: 20040123092626.55d2a5d7.gvermeul () grenoble ! cnrs ! fr
[Download RAW message or body]

On Thu, 22 Jan 2004 13:14:18 -0800
"Tuvi, Selim" <stuvi@SLAC.Stanford.EDU> wrote:

> Hi, I noticed that beginning with PyQt 3.9 the sip files are divided into
> subdirectories. We have a SIP interface where we need to import some of the
> core SIP files from the PyQt distribution. But I don't want to break the
> compilation in case the code is compiled against an old version of PyQt. I
> tried modifying the sip.exe command line to add -I c:/PyQt/sip/qt and -I
> c:/PyQt/sip/qtcanvas in addition to -I c:/Pyqt/sip but that gives an error
> saying that qtmod is already defined. So I want to do something like:
> 
> %If (- PyQt_3_9)
> %Import qtmod.sip
> %Import qtcanvasmod.sip
> %End
> 
> %If (PyQt_3_9 -)
> %Import qt/qtmod.sip
> %Import qtcanvas/qtcanvasmod.sip
> %End
>
You can define OLD_SIP and NEW_SIP as features:

%Feature OLD_SIP
%Feature NEW_SIP

and do:

%If (OLD_SIP)
...
%End

%If (NEW_SIP)
...
%END

But for PyQwt, I did not do that because the new and old sip languages
are too different for my taste. (snapshot at http://pyqwt.sourceforge.net)

Gerard  

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic