From 33ab7535c27ae79bbb07372e214203f673fd2e86 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Domen=20Ko=C5=BEar?= Date: Wed, 25 Jul 2012 22:47:26 +0200 Subject: [PATCH] Add comparison table and py2exe notes on freezing topic --- docs/shipping/freezing.rst | 82 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 70 insertions(+), 12 deletions(-) diff --git a/docs/shipping/freezing.rst b/docs/shipping/freezing.rst index b6803af..fc46cdd 100644 --- a/docs/shipping/freezing.rst +++ b/docs/shipping/freezing.rst @@ -8,42 +8,100 @@ Many applications you use every day do this: - Dropbox - BitTorrent -- - +- ... .. todo:: Fill in "Freezing Your Code" stub + + +Comparison +---------- + +Solutions and platforms/features supported: + +=========== ======= ===== ==== ======== ======= ============= ============== ==== ===================== +Solution Windows Linux OS X Python 3 Licence One-file mode Zipfile import Eggs pkg_resources support +=========== ======= ===== ==== ======== ======= ============= ============== ==== ===================== +bbFreeze yes yes yes no MIT no yes yes yes +py2exe yes no no no MIT yes yes no no +pyInstaller yes yes yes no GPL yes no yes no +cx_Freeze yes yes yes yes PSF no yes yes no +=========== ======= ===== ==== ======== ======= ============= ============== ==== ===================== + +.. todo:: Add other solutions: py2app + +.. note:: + Freezing Python code on Linux into a Windows executable was only once + supported in PyInstaller, `but later dropped + `_. + +.. note:: + All solutions need MS Visual C++ dll to be installed on target machine. + Only Pyinstaller makes self-executable exe that bundles the dll when + passing ``--onefile`` to `Configure.py`. + Windows -::::::: +------- + +bbFreeze +~~~~~~~~ + +Prerequisite is to install :ref:`Python, Distribute and pywin32 dependency on Windows `. +.. todo:: Write steps for most basic .exe py2exe ------- +~~~~~~ +Prerequisite is to install :ref:`Python on Windows `. +1. Download and install http://sourceforge.net/projects/py2exe/files/py2exe/ -OSX -::: +2. Write setup.py (`List of configuration options `_):: + from distutils.core import setup + import py2exe -py2app ------- + setup( + windows=[{'script': 'foobar.py'}], + ) + +3. (Optionally) `include icon `_ +4. (Optionally) `one-file mode `_ +5. Generate `.exe` into `dist` directory:: + $ python setup.py py2exe + +6. Provide the Microsoft Visual C runtime DLL. Two options: `globally install dll on target machine `_ or `distribute dll aloneside with .exe `_. PyInstaller ------------ +~~~~~~~~~~~ + +Prerequisite is to have installed :ref:`Python, Distribute and pywin32 dependency on Windows `. + +- `Most basic tutorial `_ +- `Manual `_ +OSX +--- + + +py2app +~~~~~~ + +PyInstaller +~~~~~~~~~~~ Linux -::::: +----- bbFreeze --------- +~~~~~~~~ PyInstaller ------------ +~~~~~~~~~~~ -- 1.8.0.2