Changeset 365a17f6 in sasview for sansview


Ignore:
Timestamp:
Feb 13, 2009 7:55:35 PM (15 years ago)
Author:
Mathieu Doucet <doucetm@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
cbee247
Parents:
6c98b98
Message:

Preparing for executable build

Location:
sansview
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sansview/sansview.py

    rd89f09b r365a17f6  
    1919        # Additional perspectives can still be loaded 
    2020        # dynamically 
     21        # Note: py2exe can't find dynamically loaded 
     22        # modules. We load the fitting module here 
     23        # to ensure a complete Windows executable build. 
     24        import perspectives.fitting as module     
     25        fitting_plug = module.Plugin() 
     26        self.gui.add_perspective(fitting_plug) 
    2127             
    2228        # Build the GUI 
  • sansview/setup_exe.py

    rb30f001 r365a17f6  
    22 
    33# 
    4 # The setup to create a single exe file. 
     4# The setup to create a Windows executable. 
     5# Inno Setup can then be used with the installer.iss file  
     6# in the top source directory to create an installer.  
    57# 
     8# Setuptools clashes with py2exe 0.6.8 (and probably later too). 
     9# For that reason, most of the code needs to have direct imports 
     10# that are not going through pkg_resources.  
     11# 
     12# Attention should be paid to dynamic imports. Data files can 
     13# be added to the distribution directory for that purpose. 
     14# See for example the 'images' directory below. 
    615 
    716import os, sys 
    8  
    917from distutils.core import setup 
    10  
    1118from distutils.filelist import findall 
    12  
    1319import matplotlib 
    14  
    1520import py2exe 
    1621 
     
    2530       type="win32" 
    2631   /> 
    27    <description>PrView</description> 
     32   <description>SansView</description> 
    2833   <dependency> 
    2934       <dependentAssembly> 
     
    4651        self.__dict__.update(kw) 
    4752        # for the versioninfo resources 
    48         self.version = "0.1" 
     53        self.version = "0.2" 
    4954        self.company_name = "U Tennessee" 
    5055        self.copyright = "copyright 2008" 
    51         self.name = "PrView" 
     56        self.name = "SansView" 
    5257         
    5358# 
     
    5762matplotlibdatadir = matplotlib.get_data_path() 
    5863matplotlibdata = findall(matplotlibdatadir) 
    59 matplotlibdata_files = [] 
     64data_files = [] 
    6065 
    6166for f in matplotlibdata: 
    62     dirname = os.path.join('matplotlibdata', f[len(matplotlibdatadir)+1:]) 
    63     matplotlibdata_files.append((os.path.split(dirname)[0], [f])) 
     67    dirname = os.path.join('mpl-data', f[len(matplotlibdatadir)+1:]) 
     68    data_files.append((os.path.split(dirname)[0], [f])) 
    6469 
     70# Copying the images directory to the distribution directory. 
     71for f in findall('images'): 
     72    if os.path.split(f)[0].count('.svn')==0: 
     73        data_files.append((os.path.split(f)[0], [f])) 
     74     
    6575# 
    6676# packages 
    6777# 
    68 packages = [ 
    69     'matplotlib', 'pytz' 
    70     ] 
    71  
     78packages = ['matplotlib', 'pytz'] 
    7279includes = [] 
    73 excludes = ['OpenGL']  
     80excludes = []  
    7481 
    7582dll_excludes = [ 
     
    7986    ] 
    8087 
    81 ## This is the client for PARK: run on wx 
    8288target_wx_client = Target( 
    83     description = 'fit  viewer', 
     89    description = 'SanView', 
    8490    script = 'sansview.py', 
    85     #other_resources = [(RT_MANIFEST, 1, manifest_template % dict(prog="AppJob"))], 
    8691    icon_resources = [(1, "images/ball.ico")], 
    8792    other_resources = [(24,1,manifest)], 
    88     dest_base = "sansView" 
     93    dest_base = "SansView" 
    8994    ) 
    9095 
     
    106111            }, 
    107112    }, 
    108     data_files=matplotlibdata_files 
     113    data_files=data_files 
    109114     
    110     # Do something like this to add images to the distribution 
    111     #data_files=[ ("prog",["kategorien.xml",])] 
    112115) 
    113116 
Note: See TracChangeset for help on using the changeset viewer.