1 # -*- coding: utf-8 -*-
2 from distutils.core import setup
3 import py2exe
4 import glob
5 import sys
6 sys.setrecursionlimit(10000000)
7
8 # 在命令行下运行 python setup.py py2exe
9
10 setup(
11 options={
12 "py2exe":{
13 "includes":["sip",
14 "matplotlib.backends",
15 "matplotlib.figure",
16 "matplotlib.backends.backend_tkagg"
17 ],
18 "dll_excludes":["MSVCP90.dll", 'libopenblas.JKAMQ5EVHIVCPXP2XZJB2RQPIN47S32M.gfortran-win32.dll'],
19 "compressed":1,
20 "optimize":2,
21 # "bundle_files":1
22 }
23 },
24 version = "0.1.0",
25 description = "PID Debug",
26 name = "PID",
27 zipfile=None,
28 data_files = [(r'mpl-data', glob.glob(r'C:\Python27\Lib\site-packages\matplotlib\mpl-data\*.*')),
29 (r'mpl-data', [r'C:\Python27\Lib\site-packages\matplotlib\mpl-data\matplotlibrc']),
30 (r'mpl-data\images', glob.glob(r'C:\Python27\Lib\site-packages\matplotlib\mpl-data\images\*.*')),
31 (r'mpl-data\fonts', glob.glob(r'C:\Python27\Lib\site-packages\matplotlib\mpl-data\fonts\*.*'))],
32 windows=[{"script":'main.py',
33 "icon_resources":[(1, "3.ico")]
34 }
35 ]
36 )