[PyQt] Platforms directive or tags, or both?

Larry Shaffer larrys at dakotacarto.com
Thu Oct 18 16:42:30 BST 2012


Hi,

I'm working on a fix for Mac (for QGIS project) where size_t needs a
different typedef in a sip file than other platforms.

See: http://hub.qgis.org/issues/6505

The build system is CMake that passes -t WS_MACX from the found PyQt4
config on the command line. So, I wrote a simple:

%If (WS_MACX)
typedef unsigned long size_t;
%End
%If (!WS_MACX)
typedef unsigned int size_t;
%End

When I tried to enable the platform with  %Platforms {WS_MACX} I was
presented with an error noting it had already been defined (or
enabled), presumably because of the existing tag. Does the Platforms
directive need to be used if already enabling a platform via -t on the
command line?

Also, I would either like to know what the other platforms' (Win,
Linux, etc.) tags are expected to be and whether those can be counted
on being consistent, or whether I can just use the CMake platform
variables to pass in known, valid tags (WIN32, UNIX, APPLE) to use in
sip files.

The project has to support older sip versions on some distros, so the
benefits provided by sip 4.14 for Platforms can't be used.

Regards,

Larry Shaffer
Dakota Cartography
Black Hills, South Dakota


More information about the PyQt mailing list