Changeset efe730d in sasview for sasview/setup_mac.py
- Timestamp:
- Jun 25, 2016 2:07:33 AM (8 years ago)
- 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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 899e084
- Parents:
- 9501661
- git-author:
- Paul Kienzle <pkienzle@…> (06/25/16 00:23:59)
- git-committer:
- Paul Kienzle <pkienzle@…> (06/25/16 02:07:33)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasview/setup_mac.py
r3d8e3c7 refe730d 12 12 """ 13 13 from setuptools import setup 14 import periodictable.xsf15 import sas.sascalc.dataloader.readers16 14 import os 17 15 import string 18 import local_config19 16 import pytz 20 17 import sys … … 29 26 sys.path.insert(0, build_path) 30 27 print "BUILDING PATH INSIDE", build_path 28 29 from sas.sasview import local_config 30 31 31 ICON = local_config.SetupIconFile_mac 32 32 EXTENSIONS_LIST = [] 33 RESOURCES_FILES = [] 33 34 DATA_FILES = [] 34 RESOURCES_FILES = []35 35 36 36 #Periodictable data file 37 DATA_FILES = periodictable.data_files() 37 import periodictable 38 DATA_FILES += periodictable.data_files() 38 39 #invariant and calculator help doc 39 import sas.sasgui.perspectives.fitting asfitting40 from sas.sasgui.perspectives import fitting 40 41 DATA_FILES += fitting.data_files() 41 import sas.sasgui.perspectives.calculator ascalculator42 from sas.sasgui.perspectives import calculator 42 43 DATA_FILES += calculator.data_files() 43 import sas.sasgui.perspectives.invariant asinvariant44 from sas.sasgui.perspectives import invariant 44 45 DATA_FILES += invariant.data_files() 45 import sasmodels as models46 DATA_FILES += models.data_files()47 import sas.sasgui.guiframe asguiframe46 import sasmodels 47 DATA_FILES += sasmodels.data_files() 48 from sas.sasgui import guiframe 48 49 DATA_FILES += guiframe.data_files() 49 50 50 51 #CANSAxml reader data files 51 RESOURCES_FILES.append(os.path.join(sas.sascalc.dataloader.readers.get_data_path(),'defaults.json')) 52 53 # Locate libxml2 library 54 lib_locs = ['/usr/local/lib', '/usr/lib'] 55 libxml_path = None 56 for item in lib_locs: 57 libxml_path_test = '%s/libxml2.2.dylib' % item 58 if os.path.isfile(libxml_path_test): 59 libxml_path = libxml_path_test 60 if libxml_path == None: 61 raise RuntimeError, "Could not find libxml2 on the system" 62 63 APP = ['sasview.py'] 64 DATA_FILES += ['images','test','media', 'custom_config.py', 'local_config.py', 65 'default_categories.json'] 52 from sas.sascalc.dataloader import readers 53 RESOURCES_FILES.append(os.path.join(readers.get_data_path(),'defaults.json')) 54 55 # Copy the config files 56 sasview_path = os.path.join('..','src','sas','sasview') 57 custom_config_file = os.path.join(sasview_path, 'custom_config.py') 58 local_config_file = os.path.join(sasview_path, 'local_config.py') 59 DATA_FILES.append(('.', [custom_config_file])) 60 DATA_FILES.append(('config', [custom_config_file])) 61 DATA_FILES.append(('.', [local_config_file])) 62 63 # default_categories.json is beside the config files 64 category_config = os.path.join(sasview_path, 'default_categories.json') 65 if os.path.isfile(category_config): 66 DATA_FILES.append(('.', [category_config])) 67 66 68 if os.path.isfile("BUILD_NUMBER"): 67 DATA_FILES.append("BUILD_NUMBER") 69 DATA_FILES.append(('.', ["BUILD_NUMBER"])) 70 71 images_dir = local_config.icon_path 72 media_dir = local_config.media_path 73 images_dir = local_config.icon_path 74 test_dir = local_config.test_path 75 test_1d_dir = os.path.join(test_dir, "1d_data") 76 test_2d_dir = os.path.join(test_dir, "2d_data") 77 test_save_dir = os.path.join(test_dir, "save_states") 78 test_upcoming_dir = os.path.join(test_dir, "upcoming_formats") 79 80 # Copying the images directory to the distribution directory. 81 for f in findall(images_dir): 82 DATA_FILES.append(("images", [f])) 83 84 # Copying the HTML help docs 85 for f in findall(media_dir): 86 DATA_FILES.append(("media", [f])) 87 88 # Copying the sample data user data 89 for f in findall(test_1d_dir): 90 DATA_FILES.append(("test\\1d_data", [f])) 91 92 # Copying the sample data user data 93 for f in findall(test_2d_dir): 94 DATA_FILES.append(("test\\2d_data", [f])) 95 96 # Copying the sample data user data 97 for f in findall(test_save_dir): 98 DATA_FILES.append(("test\\save_states", [f])) 99 100 # Copying the sample data user data 101 for f in findall(test_upcoming_dir): 102 DATA_FILES.append(("test\\upcoming_formats", [f])) 103 104 # Copying opencl include files 105 for f in findall(opencl_include_dir): 106 DATA_FILES.append(("includes\\pyopencl", [f])) 68 107 69 108 # See if the documentation has been built, and if so include it. … … 119 158 CFBundleTypeRole="Shell" )],) 120 159 160 # Locate libxml2 library 161 lib_locs = ['/usr/local/lib', '/usr/lib'] 162 libxml_path = None 163 for item in lib_locs: 164 libxml_path_test = '%s/libxml2.2.dylib' % item 165 if os.path.isfile(libxml_path_test): 166 libxml_path = libxml_path_test 167 if libxml_path == None: 168 raise RuntimeError, "Could not find libxml2 on the system" 169 121 170 #Get version - NB nasty hack. Need to find correct way to give path to installed sasview (AJJ) 122 171 #h5py has been added to packages. It requires hdf5 to be installed separetly 123 172 # 124 import __init__ as sasviewver 125 126 VERSION = sasviewver.__version__ 173 174 from sas.sasview import __version__ as VERSION 127 175 APPNAME = "SasView "+VERSION 128 176 DMGNAME = "SasView-"+VERSION+"-MacOSX" 129 130 177 APP = ['sasview.py'] 131 DATA_FILES += ['images','test','media']132 178 133 179 EXCLUDES = ['PyQt4', 'sip', 'QtGui']
Note: See TracChangeset
for help on using the changeset viewer.