Packaging a python program

From Freehackers

Jump to: navigation, search

The goal is to take an existing python program and distribute it as a self-contained executable, that does not require python are any python module to be installed.

Contents

[edit] Py2exe

  • windows only
  • support for com servers, nt services and all the other windows stuff.
  • reasonably well documented, works well.
  • manage binary dependancies


[edit] PyInstaller

  • windows and unix
  • no support for zipfile import (introduced in python 2.3), so even works with

python 1.5.

  • can package data files inside your executable.
  • manage binary dependancies on linux

[edit] cx_Freeze

  • windows and linux
  • zipfile import support
  • no binary dependancies handling on linux

[edit] bbfreeze

  • windows and linux
  • zipfile import support
  • manage binary dependancies on linux

bbfreeze is the only one, which handles eggs and zipfile imports transparently (and therefore also provides a mechanism for including data files using setuptools pkg_resources module).

[edit] py2app

  • MacOs X only

[edit] And the winner is

PyInstaller !

It seems to have the best documentation, and to support all the features I need at the moment. I don't need zipfile import or egg import.

To make a windows standard installer, you can use InnoSetup (super simple) or NSIS (super configurable).

Personal tools