source: sasview/prview/setup_exe.py @ ccb560a

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since ccb560a was a4bd2ac, checked in by Mathieu Doucet <doucetm@…>, 16 years ago

Started to add slit smearing. Added Rg and I(q=0) as outputs. GUI

  • Property mode set to 100644
File size: 2.7 KB
Line 
1#!/usr/bin/env python
2
3#
4# The setup to create a single exe file.
5#
6
7import os, sys
8
9from distutils.core import setup
10
11from distutils.filelist import findall
12
13import matplotlib
14
15import py2exe
16
17manifest = """
18   <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
19   <assembly xmlns="urn:schemas-microsoft-com:asm.v1"
20   manifestVersion="1.0">
21   <assemblyIdentity
22       version="0.64.1.0"
23       processorArchitecture="x86"
24       name="Controls"
25       type="win32"
26   />
27   <description>PrView</description>
28   <dependency>
29       <dependentAssembly>
30           <assemblyIdentity
31               type="win32"
32               name="Microsoft.Windows.Common-Controls"
33               version="6.0.0.0"
34               processorArchitecture="X86"
35               publicKeyToken="6595b64144ccf1df"
36               language="*"
37           />
38       </dependentAssembly>
39   </dependency>
40   </assembly>
41  """
42
43   
44class Target:
45    def __init__(self, **kw):
46        self.__dict__.update(kw)
47        # for the versioninfo resources
48        self.version = "0.1"
49        self.company_name = "U Tennessee"
50        self.copyright = "copyright 2008"
51        self.name = "PrView"
52       
53#
54# Adapted from http://www.py2exe.org/index.cgi/MatPlotLib
55# to use the MatPlotLib.
56#
57matplotlibdatadir = matplotlib.get_data_path()
58matplotlibdata = findall(matplotlibdatadir)
59matplotlibdata_files = []
60
61for f in matplotlibdata:
62    dirname = os.path.join('matplotlibdata', f[len(matplotlibdatadir)+1:])
63    matplotlibdata_files.append((os.path.split(dirname)[0], [f]))
64
65#
66# packages
67#
68packages = [
69    'matplotlib', 'pytz'
70    ]
71
72includes = []
73excludes = ['OpenGL'] 
74
75dll_excludes = [
76    'libgdk_pixbuf-2.0-0.dll', 
77    'libgobject-2.0-0.dll',
78    'libgdk-win32-2.0-0.dll',
79    ]
80
81## This is the client for PARK: run on wx
82target_wx_client = Target(
83    description = 'P(r) inversion viewer',
84    script = 'sansview.py',
85    #other_resources = [(RT_MANIFEST, 1, manifest_template % dict(prog="AppJob"))],
86    icon_resources = [(1, "images/ball.ico")],
87    other_resources = [(24,1,manifest)],
88    dest_base = "prView"
89    )
90
91
92
93setup(
94    windows=[target_wx_client],
95    console=[],
96   
97    options={
98        'py2exe': {
99            'dll_excludes': dll_excludes,
100            'packages' : packages,
101            'includes':includes,
102            'excludes':excludes,
103            "compressed": 1,
104            "optimize": 0,
105            "bundle_files":2,
106            },
107    },
108    data_files=matplotlibdata_files
109   
110    # Do something like this to add images to the distribution
111    #data_files=[ ("prog",["kategorien.xml",])]
112)
113
114
Note: See TracBrowser for help on using the repository browser.