source: sasview/sansview/setup_mac.py @ 00b76931

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 00b76931 was 8ec6923, checked in by Jae Cho <jhjcho@…>, 14 years ago

added datafiles for mac

  • Property mode set to 100644
File size: 1.5 KB
Line 
1"""
2This is a setup.py script partly generated by py2applet
3
4Usage:
5    python setup.py py2app
6"""
7from setuptools import setup
8import periodictable.xsf
9import DataLoader.readers 
10from distutils.sysconfig import get_python_lib
11import os
12
13DATA_FILES = []
14RESOURCES_FILES = []
15
16#Periodictable data file
17DATA_FILES = periodictable.data_files()
18
19#invariant and calculator help doc
20import sans.perspectives.calculator as calculator
21DATA_FILES += calculator.data_files()
22import sans.perspectives.invariant as invariant
23DATA_FILES += invariant.data_files()
24import sans.models as models
25DATA_FILES += models.data_files()
26
27#CANSAxml reader data files
28RESOURCES_FILES.append(os.path.join(DataLoader.readers.get_data_path(),'defaults.xml'))
29
30# Locate libxml2 library
31lib_locs = ['/usr/local/lib', '/usr/lib']
32libxml_path = None
33for item in lib_locs:
34    libxml_path_test = '%s/libxml2.2.dylib' % item
35    if os.path.isfile(libxml_path_test): 
36        libxml_path = libxml_path_test
37if libxml_path == None:
38    raise RuntimeError, "Could not find libxml2 on the system"
39
40APP = ['sansview.py']
41DATA_FILES += ['images','test','plugins','media']
42OPTIONS = {'argv_emulation': True,
43           'packages': ['lxml','periodictable'],
44           'iconfile': 'images/ball.icns',
45           'frameworks':[libxml_path],
46           'resources': RESOURCES_FILES
47           }
48
49setup(
50    app=APP,
51    data_files=DATA_FILES,
52    include_package_data= True,
53    options={'py2app': OPTIONS},
54    setup_requires=['py2app'],
55)
Note: See TracBrowser for help on using the repository browser.