[PyQt] Detecting which Python version is used by SIP and PyQt
xavion.0 at gmail.com
Sat Oct 23 01:54:40 BST 2010
Arch Linux has recently switched its 'python' package to the Python v3
branch. SIP and PyQt still require the 'python2' package, probably because
the unpatched D-Bus Python bindings currently won't work with Python v3.
I'm guessing that some other Linux distributions will continue using Python
v2 for a while yet. Due to this uncertainty, I'm thinking that the
Makefiles of my applications should detect whether PyQt is attached to
Python v2 or v3.
Doing so will save me from having to hard-code something like
"#!/usr/bin/env python2" into the main executable file, only to be
disappointed after finding out that some Linux distributions have already
built PyQt on Python v3.
I realise that I could just search for the "/site-packages/PyQt4/"
directory, but I want a much cleaner solution that won't slow down the
installation processes. So, how should my Makefiles determine this
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt