[PyKDE] How To Publish a pyqt application

Hans-Peter Jansen hpj at urpla.net
Tue Mar 28 22:42:52 BST 2006


Am Dienstag, 28. März 2006 12:23 schrieb Tina Isaksen:
> Gerard Vermeulen wrote:
> >A possibility is to install Python, Qt and PyQt and your
> >application in for instance /home/yourhome/usr.
> >
> >You can do this with Python's
> >./configure --prefix=/home/yourhome/usr
> >
> >For Qt you have to do something similar.
> >
> >Add /home/yourhome/usr to the front of your PATH
> >environment variable and install PyQt (you have
> >to specify where to find Qt).
> >
> >Make a tar.gz of the /usr directory and distribute
> >the tar.gz.  All you have to do is to instruct your
> >users to unpack your tar.gz and to modify their PATH
> >environment variable.
> >
> >The disadvantage is that your tar.gz will be really big.

..and won't work, if arch don't match or gcc/glibc versions differ to 
much.. 

> >Voila -- Gerard
>
> And if you already have Qt installed it would really eat discspace
> for no reason.
>
> Isn't a better way to write a simple bash (or Python for that matter)
> 'install-script' that checks if the necessary modules is installed
> and list them as dependencies if they are missing?
> Maybe also list how to get the required stuff in a readme...

Using a sane package manager with proper dependencies is the right and 
the easiest way to go. 

Or quick n'dirty:

try:
    from qt import *
except:
    popen2("kdialog --sorry 'PyQt (Qt bindings for Python) is required 
for this script.'")
    raise

Pete




More information about the PyQt mailing list