Changeset 92df9cbd in sasview for installers/setup_mac.py
- Timestamp:
- Sep 20, 2017 5:27:53 PM (7 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:
- 488f3a5
- Parents:
- 1693141
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
installers/setup_mac.py
r0ccbd36 r92df9cbd 24 24 from setuptools import setup 25 25 26 import macholib_patch 27 28 if os.path.abspath(os.path.dirname(__file__))!= os.path.abspath(os.getcwd()):26 # Need the installer dir on the python path to find helper modules 27 installer_dir = os.path.abspath(os.path.dirname(__file__)) 28 if installer_dir != os.path.abspath(os.getcwd()): 29 29 raise RuntimeError("Must run setup_exe from the installers directory") 30 sys.path.append(installer_dir) 30 31 31 32 # put the build directory at the front of the path … … 39 40 #Extending recursion limit 40 41 sys.setrecursionlimit(10000) 42 43 import macholib_patch 41 44 42 45 from sas.sasview import local_config … … 79 82 80 83 # Copying the images directory to the distribution directory. 81 images_dir = local_config.icon_path 82 for f in findall(images_dir): 83 data_files.append(("images", [f])) 84 data_files.append(("images", findall(local_config.icon_path))) 84 85 85 86 # Copying the HTML help docs 86 media_dir = local_config.media_path 87 for f in findall(media_dir): 88 data_files.append(("media", [f])) 87 data_files.append(("media", findall(local_config.media_path))) 89 88 90 89 # Copying the sample data user data 91 90 test_dir = local_config.test_path 92 for f in findall(os.path.join(test_dir, "1d_data")): 93 data_files.append((os.path.join("test", "1d_data"), [f])) 94 for f in findall(os.path.join(test_dir, "2d_data")): 95 data_files.append((os.path.join("test", "2d_data"), [f])) 96 for f in findall(os.path.join(test_dir, "save_states")): 97 data_files.append((os.path.join("test", "save_states"), [f])) 98 for f in findall(os.path.join(test_dir, "upcoming_formats")): 99 data_files.append((os.path.join("test", "upcoming_formats"), [f])) 91 for dirpath, dirnames, filenames in os.walk(test_dir): 92 target_dir = os.path.join("test", os.path.relpath(dirpath, test_dir)) 93 source_files = [os.path.join(dirpath, f) for f in filenames] 94 data_files.append((target_dir, source_files)) 100 95 101 96 # See if the documentation has been built, and if so include it. 102 97 if os.path.exists(doc_path): 103 98 for dirpath, dirnames, filenames in os.walk(doc_path): 104 for filename in filenames:105 sub_dir = os.path.join("doc", os.path.relpath(dirpath, doc_path))106 data_files.append((sub_dir, [os.path.join(dirpath, filename)]))99 target_dir = os.path.join("doc", os.path.relpath(dirpath, doc_path)) 100 source_files = [os.path.join(dirpath, f) for f in filenames] 101 data_files.append((target_dir, source_files)) 107 102 else: 108 103 raise Exception("You must first build the documentation before creating an installer.") 109 104 110 105 # Copying opencl include files 111 site_loc = get_python_lib() 112 opencl_include_dir = os.path.join(site_loc, "pyopencl", "cl") 113 for f in findall(opencl_include_dir): 114 data_files.append((os.path.join("includes", "pyopencl"), [f])) 106 opencl_source = os.path.join(get_python_lib(), "pyopencl", "cl") 107 opencl_target = os.path.join("includes", "pyopencl") 108 data_files.append((opencl_target, findall(opencl_source))) 115 109 116 110 # Locate libxml2 library … … 186 180 'excludes' : EXCLUDES, 187 181 } 182 183 #import pprint; pprint.pprint(data_files); sys.exit() 188 184 setup( 189 185 name=APPNAME,
Note: See TracChangeset
for help on using the changeset viewer.