Differences between revisions 3 and 4
Revision 3 as of 2008-07-08 11:27:43
Size: 1777
Editor: localhost
Comment: converted to 1.6 markup
Revision 4 as of 2008-11-25 22:21:45
Size: 2341
Editor: ChrisBarker
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
Line 12: Line 13:
||<tablewidth="721px" tableheight="227px">unbuffered ||if true, use unbuffered binary stdout and stderr ||
||optimize ||string or int of optimization level (0, 1, or 2) ||
||includes ||list of module names to include ||
||packages ||list of packages to include with subpackages ||
||ignores ||list of modules to ignore if they are not found ||
||excludes ||list of module names to exclude ||
||dll_excludes ||list of dlls to exclude ||
||dist_dir ||directory in which to build the final files ||
||typelibs ||list of gen_py generated typelibs to include ||
Line 22: Line 14:
||<tablewidth="820px" tableheight="227px">unbuffered ||if true, use unbuffered binary stdout and stderr ||
||optimize || string or int of optimization level (0, 1, or 2) ||
||includes || list of module names to include ||
||packages || list of packages to include with subpackages ||
||ignores || list of modules to ignore if they are not found ||
||excludes || list of module names to exclude ||
||dll_excludes || list of dlls to exclude ||
||dist_dir || directory in which to build the final files ||
||typelibs || list of gen_py generated typelibs to include ||
||compressed ||(boolean) create a compressed zipfile ||
|| xref ||(boolean) create and show a module cross reference ||
||bundle-files || bundle dlls in the zipfile or the exe. Valid levels are 1, 2, or 3 (default) ||
||skip-archive ||(boolean) do not place Python bytecode files in an archive, put them directly in the file system||
|| ascii ||(boolean) do not automatically include encodings and codecs ||
||custom-boot-script || Python file that will be run when setting up the runtime environment ||

In addition to thestandard distutils setup keywords, the following py2exe keywords specify what and how to build:

console

list of scripts to convert into console exes

windows

list of scripts to convert into GUI exes

service

list of module names containing win32 service classes

com_server

list of module names containing com server classes

ctypes_com_server

list of module names containing com server classes

zipfile

name of shared zipfile to generate; may specify a subdirectory; defaults to 'library.zip'

options

dictionary { "py2exe": { "opt1": val1, "opt2": val2, ... } }

The following options dictionary entries are available:

unbuffered

if true, use unbuffered binary stdout and stderr

optimize

string or int of optimization level (0, 1, or 2)

includes

list of module names to include

packages

list of packages to include with subpackages

ignores

list of modules to ignore if they are not found

excludes

list of module names to exclude

dll_excludes

list of dlls to exclude

dist_dir

directory in which to build the final files

typelibs

list of gen_py generated typelibs to include

compressed

(boolean) create a compressed zipfile

xref

(boolean) create and show a module cross reference

bundle-files

bundle dlls in the zipfile or the exe. Valid levels are 1, 2, or 3 (default)

skip-archive

(boolean) do not place Python bytecode files in an archive, put them directly in the file system

ascii

(boolean) do not automatically include encodings and codecs

custom-boot-script

Python file that will be run when setting up the runtime environment

Example:

setup(
        windows=['trypyglet.py'],
        options={
                "py2exe":{
                        "unbuffered": True,
                        "optimize": 2,
                        "excludes": ["email"]
                }
        }
)

For more information enter the following at the python command line:

>>> from distutils.core import setup
>>> help(setup

ListOfOptions (last edited 2009-11-04 16:59:32 by FlorianHoech)