cx_Freeze module is a set of utilities that can freeze Python scripts into executables in a cross platform way, using many of the techniques found in Thomas Heller's py2exe, Gordon McMillan's Installer, and the Freeze utility that ships with Pyt
Why did I go to the trouble of creating another set of utilities when these three utilities already existed? The Freeze utility that comes with Python itself requires a source distribution, a C compiler and linker which makes for a complex environment for creating executables. In addition, this method is very slow for creating executables as compared to the other methods. py2exe is intended for development on Windows only and cx_Freeze is intended for cross platform development. Installer uses an import hook which means that the development environment and runtime environment are considerably different.
How does it work? A base executable is created which contains code for unpacking the list of frozen modules, starting up the Python interpreter and passing control to the script which is being frozen. When a script is frozen, the script is searched for all references to modules and these modules are then byte compiled and written to the end of the base executable. If the modules that are referenced are extensions written in C, these modules must be included in the path in which the frozen executable is deployed.
Installation:
Extract the archive into a directory. In order to build cx_Freeze you need to have gcc and Python development include files and libraries available. Run the following commands.
python MakeFrozenBases.py
python FreezePython.py --no-copy-deps FreezePython.py
When these commands have completed successfully, the directory will be in the same state as a binary installation. Note that on Windows these scripts assume the presence of a mingw32 installation which can be acquired from http://www.mingw.org.
Product's homepage
What's New in This Release: [ read full changelog ]
· Added support for Python 3.2.
· Added hook for datetime module which implicitly imports the time module.
· Fixed hook for tkinter in Python 3.x.
· Always include the zlib module since the zipimport module requires it, even when compression is not taking place.
· Added sample for a tkinter application.