print("hoge hoge hoge")
from cx_Freeze import setup, Executable
setup(
name='hoge',
options = dict(
build_exe = dict(
create_shared_zip = False,
append_script_to_exe = True,
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に含めるにはどうしたらいいんだろう?