source: sasview/prview/setup_exe.py @ de9483d

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 de9483d was 4a5de6f, checked in by Mathieu Doucet <doucetm@…>, 16 years ago

Modified for Windows executable.

  • Property mode set to 100644
File size: 1.9 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
17   
18class Target:
19    def __init__(self, **kw):
20        self.__dict__.update(kw)
21        # for the versioninfo resources
22        self.version = "0.1"
23        self.company_name = "U Tennessee"
24        self.copyright = "copyright 2008"
25        self.name = "PrView"
26       
27#
28# Adapted from http://www.py2exe.org/index.cgi/MatPlotLib
29# to use the MatPlotLib.
30#
31matplotlibdatadir = matplotlib.get_data_path()
32matplotlibdata = findall(matplotlibdatadir)
33matplotlibdata_files = []
34
35for f in matplotlibdata:
36    dirname = os.path.join('matplotlibdata', f[len(matplotlibdatadir)+1:])
37    matplotlibdata_files.append((os.path.split(dirname)[0], [f]))
38
39#
40# packages
41#
42packages = [
43    'matplotlib', 'pytz'
44    ]
45
46includes = []
47excludes = ['OpenGL'] 
48
49dll_excludes = [
50    'libgdk_pixbuf-2.0-0.dll', 
51    'libgobject-2.0-0.dll',
52    'libgdk-win32-2.0-0.dll',
53    ]
54
55## This is the client for PARK: run on wx
56target_wx_client = Target(
57    description = 'P(r) inversion viewer',
58    script = 'sansview.py',
59    #other_resources = [(RT_MANIFEST, 1, manifest_template % dict(prog="AppJob"))],
60    icon_resources = [(1, "images/ball.ico")],
61    dest_base = "prView"
62    )
63
64
65
66setup(
67    windows=[target_wx_client],
68    console=[],
69   
70    options={
71        'py2exe': {
72            'dll_excludes': dll_excludes,
73            'packages' : packages,
74            'includes':includes,
75            'excludes':excludes,
76            "compressed": 1,
77            "optimize": 0,
78            "bundle_files":2,
79            },
80    },
81    data_files=matplotlibdata_files
82   
83    # Do something like this to add images to the distribution
84    #data_files=[ ("prog",["kategorien.xml",])]
85)
86
87
Note: See TracBrowser for help on using the repository browser.