[PyKDE] version numbers in .sip files

Phil Thompson phil at riverbankcomputing.co.uk
Fri Aug 15 01:41:01 BST 2003


On Thursday 14 August 2003 9:15 pm, satish k.chimakurthi wrote:
> Hello all,
>
> I am an absolute newbie to SIP. I started browsing thru the documentation
> online. I dont' understand the following :
>
> %If Version ( - Qt_2_00) ....
>
> I am not able to understand about when exactly I need to use "Version"
> while writing ".sip" file...And how should I choose the numerals inside the
> bracket

APIs can change between different releases (versions) of a class library. 
Also, APIs can be dependent on other factors like the platform. SIP allows 
version "tags" to be defined which allows a single .sip file to describe the 
complete history of an API.

SIP supports three sorts of tags. These are defined by %Timeline (the tags 
represent a chronological sequence), %Platforms (the tags represent a 
mutually exclusive set), and %Feature (each feature tag is mutually 
independant). See the versions.sip file in PyQt for examples.

SIP takes any number of -t flags that specify the tags to apply when 
generating code. For example, the build.py script that is run when 
configuring PyQt works out what platform you are on and what version of Qt is 
installed. It then runs SIP with the corresponding tags so that the generated 
code matches your system.

Phil




More information about the PyQt mailing list