[いやな日記][1] を参考に [py2exe][2] を使ってみると、hello.py を exe にしただけで distディレクトリのサイズは 2.04MB になった。
[いやな日記][1] では 1.2MB と書かれている。なんでだろ?
Python スクリプトを Windows 用の実行ファイルに変換するソフトには [py2exe][2] の他に [PyInstaller][3] というのがあるらしい。
早速試してみた。
[PyInstaller][3] のページから PyInstaller 1.0 をダウンロードしてを展開する。
cd pyinstaller_1.0
python Configure.py
hello.py を作成する
print “hello, world”
実行ファイルを作成する
python Makespec.py hello.py
python Build.py ./hello/hello.spec
disthelloディレクトリのサイズは 1.41MB。
[1]: http://namazu.org/~satoru/diary/20040718.html
[2]: http://www.py2exe.org/
[3]: http://pyinstaller.hpcf.upr.edu/cgi-bin/trac.cgi/wiki