Skip to content

Instantly share code, notes, and snippets.

Created January 27, 2014 02:23
Show Gist options
  • Save anonymous/8642423 to your computer and use it in GitHub Desktop.
Save anonymous/8642423 to your computer and use it in GitHub Desktop.
from distutils.core import setup
from glob import glob
import py2exe, sys
# 目的の dll があるパスを明示する
sys.path.append("C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\redist\\x86\\Microsoft.VC90.CRT")
# じゃないと、ここでパスを明示しても py2exe が dll を拾ってきてくれない
data_files = [('Microsoft.VC90.CRT', \
glob(r'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*'))]
setup(
windows = [{'script':'c:\プロジェクトフォルダ\mvc_test.py'}],
data_files = data_files
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment