00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 from distutils.core import setup
00018 import py2exe
00019 import matplotlib
00020 import pyproj
00021 import wx
00022 import glob
00023 import os
00024
00025
00026
00027
00028
00029
00030 appPath = 'C:\work\RevealedSystems\EyeSpy-RS\eyespy\src'
00031 PythonPath = 'C:\win32app\Python25'
00032
00033 def tree(src):
00034 pathList = [map(lambda f: os.path.join(root, f), files)
00035 for (root, dirs, files) in os.walk(os.path.normpath(src))]
00036
00037 retList = []
00038 for paths in pathList:
00039 retList += paths
00040
00041 return retList;
00042
00043 opts = {
00044 'py2exe': { "includes" : ["matplotlib.backends", "matplotlib.backends.backend_wx",
00045 "matplotlib.figure","pylab", "numpy", "matplotlib.numerix.fft",
00046 "matplotlib.numerix.linear_algebra", "matplotlib.numerix.random_array",
00047 "matplotlib.backends.backend_tkagg", "matplotlib.toolkits.basemap", ],
00048 'excludes': ['_gtkagg', '_tkagg', '_agg2', '_cairo', '_cocoaagg',
00049 '_fltkagg', '_gtk', '_gtkcairo', "pcapyImplementation"],
00050 'dll_excludes': ['libgdk-win32-2.0-0.dll',
00051 'libgobject-2.0-0.dll',
00052 'wxmsw26uh_vc.dll',
00053 'libgdk_pixbuf-2.0-0.dll'],
00054 'skip_archive': 1,
00055 'packages' : ['matplotlib', 'pytz']
00056 }
00057 }
00058
00059
00060 data_files = [(r'',glob.glob(appPath + r'\extras\*.*')),
00061 (r'res', tree(appPath + '\res')),
00062 (r'res\storage', glob.glob(appPath + r'\res\storage\*.*')),
00063 (r'res\images', glob.glob(appPath + r'\res\images\*.*')),
00064 (r'res\images\ico', glob.glob(appPath + r'\res\images\ico\*.*')),
00065 matplotlib.get_py2exe_datafiles(),
00066 (r'share\basemap', glob.glob(PythonPath + r'\share\basemap\*.*')),
00067 (r'config',glob.glob(appPath + r'\config\*.*'))]
00068
00069
00070 setup(windows=[{"script" : "eyespy.py","icon_resources":[(1,"eyespy.ico")]}], options=opts, data_files=data_files)
00071