cx_Freezeでexeを作る

# hoge.py
print("hoge hoge hoge")
# setup.py
from cx_Freeze import setup, Executable
setup(
    name='hoge',
    options = dict(
        build_exe = dict(
            create_shared_zip = False,      ### library.zip ではなく hoge.zip を生成する
            append_script_to_exe = True,    ### .zip を .exe に含める
            packages = [],
            excludes = ['email', 'unittest', 'doctest', 'pyreadline', 'pdb', 'bdb', 'dummy_threading'],
            includes = [],
            ),
        ),
    executables = [
        Executable(
            'hoge.py',
            base = 'Console',
            )
        ],
    )
$ python setup.py build
$ tree .
.
|-- build
|   `-- exe.win32-3.3
|       |-- _bz2.pyd
|       |-- hoge.exe
|       |-- python33.dll
|       `-- unicodedata.pyd
|-- hoge.py
`-- setup.py

2 directories, 6 files

$ build/exe.win32-3.3/hoge
hoge hoge hoge
  • create_shared_zip=Falseとappend_script_to_exe=Trueでlibrary.zipを.exeに含めることが出来た。
  • append_script_to_exe=False(初期値)にするとhoge.zipが作られる。
  • py2exeみたいに.pydや.dllも.exeに含めるにはどうしたらいいんだろう?