[PyKDE] [PyQt4] How to distribute an application.

David Boddie david at boddie.org.uk
Tue Sep 19 23:43:01 BST 2006


On Sun, 17 Sep 2006 19:52:55 +0200, Javier Sanz wrote:

> What is the recommended way to distribute an application for
> PyQt4/Linux?. Most distros don't have PyQt4 available in their
> repositories.

As an archive containing source code, or were you thinking about binary-only
packages?

Either way, if you can't rely on the presence of PyQt4 on users' systems,
you'll probably need to create some kind of executable bundle, even if you
also supply the source.

Maybe this is a good opportunity to add some hints and tips to the PyQt Wiki:

  http://www.diotavelli.net/PyQtWiki

I've never created an executable in this way, but here are two popular
tools for doing this:

  PyInstaller - http://pyinstaller.hpcf.upr.edu/cgi-bin/trac.cgi

    "PyInstaller is a program that converts (packages) Python programs into
     stand-alone executables, under Windows, Linux and Irix."

  cx_Freeze - http://starship.python.net/crew/atuining/cx_Freeze/index.html

    "cx_Freeze is a set of utilities for freezing Python scripts into
     executables using many of the techniques found in Thomas Heller's
     py2exe, Gordon McMillan's Installer and the Freeze utility that ships
     with Python itself."

I also found a couple of Windows-specific tools to do something similar:

  py2exe - http://www.py2exe.org/

    "py2exe is a Python Distutils extension which converts Python scripts
     into executable Windows programs, able to run without requiring a Python
     installation."

  ExeMaker - http://effbot.org/zone/exemaker.htm

    "ExeMaker is a small tool that takes a Python script, copies it to a
     program directory, and creates a Windows EXE file in the same
     directory."

There's also the original freeze tool that's supplied with Python - look in
the examples/Tools directory.

Let us know how you get on.

Good luck!

David




More information about the PyQt mailing list