[PyQt] Platforms directive or tags, or both?

Phil Thompson phil at riverbankcomputing.com
Fri Oct 19 09:14:57 BST 2012


On Thu, 18 Oct 2012 15:09:48 -0600, Larry Shaffer <larrys at dakotacarto.com>
wrote:
> On Thu, Oct 18, 2012 at 2:57 PM, Phil Thompson
> <phil at riverbankcomputing.com> wrote:
>> On Thu, 18 Oct 2012 11:58:59 -0600, Larry Shaffer
>> <larrys at dakotacarto.com>
>> wrote:
> -------------8<----------
>>>>> 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.
>>>>
>>>> Platforms (and tags) are a SIP specific thing.
>>>
>>> What I was suggesting is this:
>>>
>>> %Platforms {UNIX_NOTAPPLE APPLE WIN32}
>>> %If (APPLE)
>>> typedef unsigned long size_t;
>>> %End
>>> %If (!APPLE)
>>> typedef unsigned int size_t;
>>> %End
>>>
>>> where the generic platform tags are generated by CMake, before being
>>> concatenated to sip command line options:
>>>
>>> SET(_sip_tags)
>>> IF (APPLE)
>>>     LIST(APPEND _sip_tags -t APPLE)
>>> ELSEIF (UNIX)
>>>     LIST(APPEND _sip_tags -t UNIX_NOTAPPLE)
>>> ELSEIF (WIN32)
>>>     LIST(APPEND _sip_tags -t WIN32)
>>> ENDIF (APPLE)
>>>
>>> This would bypass the PyQt tags and use a set of
>>> already-known-to-be-valid platform tags from CMake. This appears for
>>> work for the Mac issue, but I'm asking if it is a proper use of the
>>> Platforms directive and tags. ??
>>
>> That's fine, though confusing as it repeats what is already provided.
> 
> Hmm. Ok, so what's already provided? I see the following in a couple
> of examples:
> 
> %Platforms {WIN32_PLATFORM POSIX_PLATFORM MACOS_PLATFORM}
> 
> but nothing definitive in the docs as to the possible platform values
> provided by sip (or am I just missing it?).

They are provided by PyQt (though, I admit, not formally documented). They
are available to anything that %Imports a PyQt module.

Phil


More information about the PyQt mailing list