%if with range version

Julien Cabieces julien.cabieces at oslandia.com
Wed Nov 6 12:36:23 GMT 2024


Hi,

Following the documentation [0], I try to use %if condition with range
versions to apply some code only for specific version of sip.

For instance, this should be parsed only when sip is bellow 5.1.0

%If ( - SIP_5_1_0)
  void printTest() /UnknownAnnotation/;
%End

But it is parsed when I generate with sip-build 6.8

$ sip-build --version
6.8.6
sip-build: /home/julien/myconf/sip-examples/deprecated/deprecated.sip:
line 19: column 21: UnknownAnnotation is not a known annotation

What am I missing ?

Regards,
Julien

[0] https://python-sip.readthedocs.io/en/stable/directives.html#timeline


-- 

Julien Cabieces
Senior Developer at Oslandia
julien.cabieces at oslandia.com


More information about the PyQt mailing list