Changeset f36e01f in sasview
- Timestamp:
- Apr 11, 2017 4:08:57 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, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- b854587
- Parents:
- 09983d1
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
run.py
r7fb59b2 rf36e01f 1 1 # -*- coding: utf-8 -*- 2 2 #!/usr/bin/env python 3 3 4 """ 4 5 Run sasview in place. This allows sasview to use the python … … 16 17 17 18 import imp 18 import logging19 import logging.config20 19 import os 21 20 import sys … … 38 37 sys.path.insert(0, path) 39 38 39 40 40 @contextmanager 41 41 def cd(path): … … 48 48 os.chdir(old_dir) 49 49 50 50 51 def import_package(modname, path): 51 52 """Import a package into a particular point in the python namespace""" 52 mod = imp.load_source(modname, abspath(joinpath(path, '__init__.py')))53 mod = imp.load_source(modname, abspath(joinpath(path, '__init__.py'))) 53 54 sys.modules[modname] = mod 54 55 mod.__path__ = [abspath(path)] 55 56 return mod 57 56 58 57 59 def import_dll(modname, build_path): … … 60 62 ext = sysconfig.get_config_var('SO') 61 63 # build_path comes from context 62 path = joinpath(build_path, *modname.split('.')) +ext63 # print "importing", modname, "from", path64 path = joinpath(build_path, *modname.split('.')) + ext 65 # print "importing", modname, "from", path 64 66 return imp.load_dynamic(modname, path) 67 65 68 66 69 def prepare(): … … 74 77 from distutils.util import get_platform 75 78 root = abspath(dirname(__file__)) 76 platform = '%s-%s' %(get_platform(),sys.version[:3])77 build_path = joinpath(root, 'build', 'lib.'+platform)79 platform = '%s-%s' % (get_platform(), sys.version[:3]) 80 build_path = joinpath(root, 'build', 'lib.' + platform) 78 81 79 82 # Notify the help menu that the Sphinx documentation is in a different … … 86 89 #if not os.path.exists(mplconfig): os.mkdir(mplconfig) 87 90 #import matplotlib 88 # matplotlib.use('Agg')89 # print matplotlib.__file__91 # matplotlib.use('Agg') 92 # print matplotlib.__file__ 90 93 #import pylab; pylab.hold(False) 91 94 # add periodictable to the path 92 try: import periodictable 93 except: addpath(joinpath(root, '..','periodictable')) 95 try: 96 import periodictable 97 except: 98 addpath(joinpath(root, '..', 'periodictable')) 94 99 95 try: import bumps 96 except: addpath(joinpath(root, '..','bumps')) 100 try: 101 import bumps 102 except: 103 addpath(joinpath(root, '..', 'bumps')) 97 104 98 105 # select wx version … … 114 121 # be better to just store the package in src/sas/sasview. 115 122 import sas 116 sas.sasview = import_package('sas.sasview', joinpath(root, 'sasview'))123 sas.sasview = import_package('sas.sasview', joinpath(root, 'sasview')) 117 124 118 125 # The sas.models package Compiled Model files should be pulled in from the build directory even though … … 123 130 import sas.sascalc.pr 124 131 sas.sascalc.pr.core = import_package('sas.sascalc.pr.core', 125 joinpath(build_path, 'sas', 'sascalc', 'pr', 'core'))132 joinpath(build_path, 'sas', 'sascalc', 'pr', 'core')) 126 133 127 134 # Compiled modules need to be pulled from the build directory. … … 129 136 import sas.sascalc.file_converter 130 137 sas.sascalc.file_converter.core = import_package('sas.sascalc.file_converter.core', 131 joinpath(build_path, 'sas', 'sascalc', 'file_converter', 'core'))138 joinpath(build_path, 'sas', 'sascalc', 'file_converter', 'core')) 132 139 133 140 # Compiled modules need to be pulled from the build directory. … … 135 142 import sas.sascalc.calculator 136 143 sas.sascalc.calculator.core = import_package('sas.sascalc.calculator.core', 137 joinpath(build_path, 'sas', 'sascalc', 'calculator', 'core'))144 joinpath(build_path, 'sas', 'sascalc', 'calculator', 'core')) 138 145 139 146 sys.path.append(build_path) 140 147 141 #print "\n".join(sys.path) 148 # print "\n".join(sys.path) 149 142 150 143 151 if __name__ == "__main__": 144 # Need to add absolute path before actual prepare call,145 # so logging can be done during initialization process too152 # Need to add absolute path before actual prepare call, 153 # so logging can be done during initialization process too 146 154 root = abspath(dirname(__file__)) 147 155 addpath(joinpath(root, 'sasview')) -
sasview/logger_config.py
r09983d1 rf36e01f 1 1 from __future__ import print_function 2 3 import logging 4 import logging.config 5 import os 6 import os.path 7 8 import pkg_resources 9 2 10 3 11 ''' … … 5 13 ''' 6 14 7 import logging8 import logging.config9 import os10 import os.path11 import pkg_resources12 15 13 16 class SetupLogger(object): … … 21 24 22 25 def config_production(self): 23 '''24 '''25 26 logger = logging.getLogger(self.name) 26 27 if not logger.root.handlers: … … 40 41 41 42 def _read_config_file(self): 42 '''43 '''44 43 if self.config_file is not None: 45 44 logging.config.fileConfig(self.config_file) -
sasview/sasview.py
ra5a74e9 rf36e01f 4 4 """ 5 5 ################################################################################ 6 # This software was developed by the University of Tennessee as part of the7 # Distributed Data Analysis of Neutron Scattering Experiments (DANSE)8 # project funded by the US National Science Foundation.6 # This software was developed by the University of Tennessee as part of the 7 # Distributed Data Analysis of Neutron Scattering Experiments (DANSE) 8 # project funded by the US National Science Foundation. 9 9 # 10 # See the license text in license.txt10 # See the license text in license.txt 11 11 # 12 # copyright 2009, University of Tennessee12 # copyright 2009, University of Tennessee 13 13 ################################################################################ 14 14 import os 15 15 import os.path 16 16 import sys 17 import logging18 import logging.config19 17 import traceback 20 18 … … 22 20 23 21 logger = SetupLogger(__name__).config_production() 22 24 23 25 24 # Log the start of the session … … 55 54 import wxcruft 56 55 wxcruft.call_later_fix() 57 # wxcruft.trace_new_id()56 # wxcruft.trace_new_id() 58 57 59 # Always use private .matplotlib setup to avoid conflicts with other60 # uses of matplotlib61 # Have to check if .sasview exists first58 # Always use private .matplotlib setup to avoid conflicts with other 59 # uses of matplotlib 60 # Have to check if .sasview exists first 62 61 sasdir = os.path.join(os.path.expanduser("~"),'.sasview') 63 62 if not os.path.exists(sasdir): … … 72 71 from sas.sasgui.guiframe.gui_style import GUIFRAME 73 72 from welcome_panel import WelcomePanel 74 # For py2exe, import config here 75 import local_config 73 76 74 PLUGIN_MODEL_DIR = 'plugin_models' 77 75 APP_NAME = 'SasView' … … 87 85 """ 88 86 """ 89 # from gui_manager import ViewApp87 # from gui_manager import ViewApp 90 88 self.gui = gui_manager.SasViewApp(0) 91 89 # Set the application manager for the GUI … … 116 114 logger.error(traceback.format_exc()) 117 115 118 # Invariant perspective116 # Invariant perspective 119 117 try: 120 118 import sas.sasgui.perspectives.invariant as module … … 134 132 logger.error("Unable to load corfunc module") 135 133 136 # Calculator perspective134 # Calculator perspective 137 135 try: 138 136 import sas.sasgui.perspectives.calculator as module … … 153 151 APP_NAME) 154 152 logger.error(traceback.format_exc()) 155 156 153 157 154 # Add welcome page … … 174 171 if len(sys.argv) > 1: 175 172 ## Run sasview as an interactive python interpreter 176 # if sys.argv[1] == "-i":173 # if sys.argv[1] == "-i": 177 174 # sys.argv = ["ipython", "--pylab"] 178 175 # from IPython import start_ipython … … 188 185 SasView() 189 186 187 190 188 if __name__ == "__main__": 191 189 run() -
sasview/setup_exe.py
rc04fb72 rf36e01f 62 62 sys.argv.remove('--extrapath') 63 63 except: 64 print 65 sys.exc_value 64 print("Error processing extra python path needed to build SasView\n %s" % \ 65 sys.exc_value) 66 66 67 67 … … 83 83 modulefinder.AddPackagePath(win32_folder, p) 84 84 for extra in ["win32com.shell", "win32com.adsi", "win32com.axcontrol", 85 "win32com.axscript", "win32com.bits", "win32com.ifilter", 86 "win32com.internet", "win32com.mapi", "win32com.propsys", 87 "win32com.taskscheduler"]: 88 89 __import__(extra) 90 m = sys.modules[extra] 91 for p in m.__path__[1:]: 92 modulefinder.AddPackagePath(extra, p) 85 "win32com.axscript", "win32com.bits", "win32com.ifilter", 86 "win32com.internet", "win32com.mapi", "win32com.propsys", 87 "win32com.taskscheduler"]: 88 __import__(extra) 89 m = sys.modules[extra] 90 for p in m.__path__[1:]: 91 modulefinder.AddPackagePath(extra, p) 93 92 94 93 except ImportError: … … 167 166 self.copyright = "copyright 2009 - 2016" 168 167 self.name = "SasView" 169 168 170 169 # 171 170 # Adapted from http://www.py2exe.org/index.cgi/MatPlotLib … … 341 340 ]) 342 341 packages.append('periodictable.core') # not found automatically 343 # packages.append('IPython')342 # packages.append('IPython') 344 343 includes = ['site', 'lxml._elementpath', 'lxml.etree'] 345 344 … … 374 373 other_resources = [(24, 1, manifest)], 375 374 dest_base = "SasView" 376 375 ) 377 376 378 377 # bundle_option = 2 -
setup.py
r2a8b4756 rf36e01f 1 # -*- coding: utf-8 -*- 2 #!/usr/bin/env python 3 1 4 """ 2 5 Setup for SasView 3 #TODO: Add checks to see that all the dependencies are on the system6 TODO: Add checks to see that all the dependencies are on the system 4 7 """ 5 import sys 8 6 9 import os 7 10 import shutil 8 from setuptools import setup, Extension 11 import sys 9 12 from distutils.command.build_ext import build_ext 10 13 from distutils.core import Command 14 11 15 import numpy as np 16 from setuptools import Extension, setup 12 17 13 18 # Manage version number ###################################### 14 19 import sasview 20 15 21 VERSION = sasview.__version__ 16 22 ############################################################## … … 25 31 # except when there is no such file 26 32 # Todo : make this list generic 27 # plugin_model_list = ['polynominal5.py', 'sph_bessel_jn.py',33 # plugin_model_list = ['polynominal5.py', 'sph_bessel_jn.py', 28 34 # 'sum_Ap1_1_Ap2.py', 'sum_p1_p2.py', 29 35 # 'testmodel_2.py', 'testmodel.py', … … 35 41 SASVIEW_BUILD = os.path.join(CURRENT_SCRIPT_DIR, "build") 36 42 37 sas_dir = os.path.join(os.path.expanduser("~"), '.sasview')43 sas_dir = os.path.join(os.path.expanduser("~"), '.sasview') 38 44 if os.path.isdir(sas_dir): 39 45 f_path = os.path.join(sas_dir, "sasview.log") … … 47 53 os.remove(f_path) 48 54 #f_path = os.path.join(sas_dir, 'plugin_models') 49 # if os.path.isdir(f_path):55 # if os.path.isdir(f_path): 50 56 # for f in os.listdir(f_path): 51 57 # if f in plugin_model_list: … … 53 59 # os.remove(file_path) 54 60 if os.path.exists(SASVIEW_BUILD): 55 print("Removing existing build directory", SASVIEW_BUILD, "for a clean build") 61 print("Removing existing build directory", 62 SASVIEW_BUILD, "for a clean build") 56 63 shutil.rmtree(SASVIEW_BUILD) 57 64 … … 63 70 enable_openmp = False 64 71 65 if sys.platform == 'darwin':72 if sys.platform == 'darwin': 66 73 if not is_64bits: 67 74 # Disable OpenMP … … 77 84 78 85 # Options to enable OpenMP 79 copt = 80 'mingw32': ['-fopenmp'],81 'unix': ['-fopenmp']}82 lopt = 83 'mingw32': ['-fopenmp'],84 'unix': ['-lgomp']}86 copt = {'msvc': ['/openmp'], 87 'mingw32': ['-fopenmp'], 88 'unix': ['-fopenmp']} 89 lopt = {'msvc': ['/MANIFEST'], 90 'mingw32': ['-fopenmp'], 91 'unix': ['-lgomp']} 85 92 86 93 # Platform-specific link options 87 platform_lopt = {'msvc' 94 platform_lopt = {'msvc': ['/MANIFEST']} 88 95 platform_copt = {} 89 96 90 97 # Set copts to get compile working on OS X >= 10.9 using clang 91 if sys.platform == 'darwin':98 if sys.platform == 'darwin': 92 99 try: 93 100 darwin_ver = int(os.uname()[2].split('.')[0]) 94 101 if darwin_ver >= 13 and darwin_ver < 14: 95 platform_copt = {'unix' : ['-Wno-error=unused-command-line-argument-hard-error-in-future']} 102 platform_copt = { 103 'unix': ['-Wno-error=unused-command-line-argument-hard-error-in-future']} 96 104 except: 97 105 print("PROBLEM determining Darwin version") 106 98 107 99 108 class DisableOpenMPCommand(Command): … … 114 123 pass 115 124 116 class build_ext_subclass( build_ext ): 125 126 class build_ext_subclass(build_ext): 117 127 def build_extensions(self): 118 128 # Get 64-bitness … … 124 134 if c in copt: 125 135 for e in self.extensions: 126 e.extra_compile_args = copt[ c]136 e.extra_compile_args = copt[c] 127 137 if c in lopt: 128 138 for e in self.extensions: 129 e.extra_link_args = lopt[ c]139 e.extra_link_args = lopt[c] 130 140 131 141 # Platform-specific build options 132 142 if c in platform_lopt: 133 143 for e in self.extensions: 134 e.extra_link_args = platform_lopt[ c]144 e.extra_link_args = platform_lopt[c] 135 145 136 146 if c in platform_copt: 137 147 for e in self.extensions: 138 e.extra_compile_args = platform_copt[ c ] 139 148 e.extra_compile_args = platform_copt[c] 140 149 141 150 build_ext.build_extensions(self) 151 142 152 143 153 class BuildSphinxCommand(Command): … … 156 166 build_sphinx.rebuild() 157 167 168 158 169 # sas module 159 170 package_dir["sas"] = os.path.join("src", "sas") … … 169 180 170 181 # sas.sascalc.invariant 171 package_dir["sas.sascalc.invariant"] = os.path.join("src", "sas", "sascalc", "invariant") 182 package_dir["sas.sascalc.invariant"] = os.path.join( 183 "src", "sas", "sascalc", "invariant") 172 184 packages.extend(["sas.sascalc.invariant"]) 173 185 … … 175 187 guiframe_path = os.path.join("src", "sas", "sasgui", "guiframe") 176 188 package_dir["sas.sasgui.guiframe"] = guiframe_path 177 package_dir["sas.sasgui.guiframe.local_perspectives"] = os.path.join(os.path.join(guiframe_path, "local_perspectives")) 189 package_dir["sas.sasgui.guiframe.local_perspectives"] = os.path.join( 190 os.path.join(guiframe_path, "local_perspectives")) 178 191 package_data["sas.sasgui.guiframe"] = ['images/*', 'media/*'] 179 packages.extend(["sas.sasgui.guiframe", "sas.sasgui.guiframe.local_perspectives"]) 192 packages.extend( 193 ["sas.sasgui.guiframe", "sas.sasgui.guiframe.local_perspectives"]) 180 194 # build local plugin 181 195 for d in os.listdir(os.path.join(guiframe_path, "local_perspectives")): 182 if d not in ['.svn', '__init__.py', '__init__.pyc']:196 if d not in ['.svn', '__init__.py', '__init__.pyc']: 183 197 package_name = "sas.sasgui.guiframe.local_perspectives." + d 184 198 packages.append(package_name) 185 package_dir[package_name] = os.path.join(guiframe_path, "local_perspectives", d) 199 package_dir[package_name] = os.path.join( 200 guiframe_path, "local_perspectives", d) 186 201 187 202 # sas.sascalc.dataloader 188 package_dir["sas.sascalc.dataloader"] = os.path.join("src", "sas", "sascalc", "dataloader") 189 package_data["sas.sascalc.dataloader.readers"] = ['defaults.json','schema/*.xsd'] 190 packages.extend(["sas.sascalc.dataloader","sas.sascalc.dataloader.readers","sas.sascalc.dataloader.readers.schema"]) 203 package_dir["sas.sascalc.dataloader"] = os.path.join( 204 "src", "sas", "sascalc", "dataloader") 205 package_data["sas.sascalc.dataloader.readers"] = [ 206 'defaults.json', 'schema/*.xsd'] 207 packages.extend(["sas.sascalc.dataloader", "sas.sascalc.dataloader.readers", 208 "sas.sascalc.dataloader.readers.schema"]) 191 209 192 210 # sas.sascalc.calculator 193 211 gen_dir = os.path.join("src", "sas", "sascalc", "calculator", "c_extensions") 194 212 package_dir["sas.sascalc.calculator.core"] = gen_dir 195 package_dir["sas.sascalc.calculator"] = os.path.join("src", "sas", "sascalc", "calculator") 196 packages.extend(["sas.sascalc.calculator","sas.sascalc.calculator.core"]) 197 ext_modules.append( Extension("sas.sascalc.calculator.core.sld2i", 198 sources = [ 199 os.path.join(gen_dir, "sld2i_module.cpp"), 200 os.path.join(gen_dir, "sld2i.cpp"), 201 os.path.join(gen_dir, "libfunc.c"), 202 os.path.join(gen_dir, "librefl.c"), 203 ], 204 include_dirs=[gen_dir], 205 ) 206 ) 213 package_dir["sas.sascalc.calculator"] = os.path.join( 214 "src", "sas", "sascalc", "calculator") 215 packages.extend(["sas.sascalc.calculator", "sas.sascalc.calculator.core"]) 216 ext_modules.append(Extension("sas.sascalc.calculator.core.sld2i", 217 sources=[ 218 os.path.join(gen_dir, "sld2i_module.cpp"), 219 os.path.join(gen_dir, "sld2i.cpp"), 220 os.path.join(gen_dir, "libfunc.c"), 221 os.path.join(gen_dir, "librefl.c"), 222 ], 223 include_dirs=[gen_dir], 224 ) 225 ) 207 226 208 227 # sas.sascalc.pr 209 srcdir 228 srcdir = os.path.join("src", "sas", "sascalc", "pr", "c_extensions") 210 229 package_dir["sas.sascalc.pr.core"] = srcdir 211 package_dir["sas.sascalc.pr"] = os.path.join("src", "sas", "sascalc", "pr")212 packages.extend(["sas.sascalc.pr", "sas.sascalc.pr.core"])213 ext_modules.append( 214 sources =[os.path.join(srcdir, "Cinvertor.c"),215 216 217 218 ))230 package_dir["sas.sascalc.pr"] = os.path.join("src", "sas", "sascalc", "pr") 231 packages.extend(["sas.sascalc.pr", "sas.sascalc.pr.core"]) 232 ext_modules.append(Extension("sas.sascalc.pr.core.pr_inversion", 233 sources=[os.path.join(srcdir, "Cinvertor.c"), 234 os.path.join(srcdir, "invertor.c"), 235 ], 236 include_dirs=[], 237 )) 219 238 220 239 # sas.sascalc.file_converter 221 240 mydir = os.path.join("src", "sas", "sascalc", "file_converter", "c_ext") 222 241 package_dir["sas.sascalc.file_converter.core"] = mydir 223 package_dir["sas.sascalc.file_converter"] = os.path.join("src","sas", "sascalc", "file_converter") 224 packages.extend(["sas.sascalc.file_converter","sas.sascalc.file_converter.core"]) 225 ext_modules.append( Extension("sas.sascalc.file_converter.core.bsl_loader", 226 sources = [os.path.join(mydir, "bsl_loader.c")], 227 include_dirs=[np.get_include()], 228 ) ) 229 230 #sas.sascalc.corfunc 231 package_dir["sas.sascalc.corfunc"] = os.path.join("src", "sas", "sascalc", "corfunc") 242 package_dir["sas.sascalc.file_converter"] = os.path.join( 243 "src", "sas", "sascalc", "file_converter") 244 packages.extend(["sas.sascalc.file_converter", 245 "sas.sascalc.file_converter.core"]) 246 ext_modules.append(Extension("sas.sascalc.file_converter.core.bsl_loader", 247 sources=[os.path.join(mydir, "bsl_loader.c")], 248 include_dirs=[np.get_include()], 249 )) 250 251 # sas.sascalc.corfunc 252 package_dir["sas.sascalc.corfunc"] = os.path.join( 253 "src", "sas", "sascalc", "corfunc") 232 254 packages.extend(["sas.sascalc.corfunc"]) 233 255 … … 237 259 238 260 # Perspectives 239 package_dir["sas.sasgui.perspectives"] = os.path.join("src", "sas", "sasgui", "perspectives") 240 package_dir["sas.sasgui.perspectives.pr"] = os.path.join("src", "sas", "sasgui", "perspectives", "pr") 241 packages.extend(["sas.sasgui.perspectives","sas.sasgui.perspectives.pr"]) 261 package_dir["sas.sasgui.perspectives"] = os.path.join( 262 "src", "sas", "sasgui", "perspectives") 263 package_dir["sas.sasgui.perspectives.pr"] = os.path.join( 264 "src", "sas", "sasgui", "perspectives", "pr") 265 packages.extend(["sas.sasgui.perspectives", "sas.sasgui.perspectives.pr"]) 242 266 package_data["sas.sasgui.perspectives.pr"] = ['media/*'] 243 267 244 package_dir["sas.sasgui.perspectives.invariant"] = os.path.join("src", "sas", "sasgui", "perspectives", "invariant") 268 package_dir["sas.sasgui.perspectives.invariant"] = os.path.join( 269 "src", "sas", "sasgui", "perspectives", "invariant") 245 270 packages.extend(["sas.sasgui.perspectives.invariant"]) 246 package_data['sas.sasgui.perspectives.invariant'] = [os.path.join("media",'*')] 247 248 package_dir["sas.sasgui.perspectives.fitting"] = os.path.join("src", "sas", "sasgui", "perspectives", "fitting") 249 package_dir["sas.sasgui.perspectives.fitting.plugin_models"] = os.path.join("src", "sas", "sasgui", "perspectives", "fitting", "plugin_models") 250 packages.extend(["sas.sasgui.perspectives.fitting", "sas.sasgui.perspectives.fitting.plugin_models"]) 251 package_data['sas.sasgui.perspectives.fitting'] = ['media/*', 'plugin_models/*'] 252 253 packages.extend(["sas.sasgui.perspectives", "sas.sasgui.perspectives.calculator"]) 271 package_data['sas.sasgui.perspectives.invariant'] = [ 272 os.path.join("media", '*')] 273 274 package_dir["sas.sasgui.perspectives.fitting"] = os.path.join( 275 "src", "sas", "sasgui", "perspectives", "fitting") 276 package_dir["sas.sasgui.perspectives.fitting.plugin_models"] = os.path.join( 277 "src", "sas", "sasgui", "perspectives", "fitting", "plugin_models") 278 packages.extend(["sas.sasgui.perspectives.fitting", 279 "sas.sasgui.perspectives.fitting.plugin_models"]) 280 package_data['sas.sasgui.perspectives.fitting'] = [ 281 'media/*', 'plugin_models/*'] 282 283 packages.extend(["sas.sasgui.perspectives", 284 "sas.sasgui.perspectives.calculator"]) 254 285 package_data['sas.sasgui.perspectives.calculator'] = ['images/*', 'media/*'] 255 286 256 package_dir["sas.sasgui.perspectives.corfunc"] = os.path.join("src", "sas", "sasgui", "perspectives", "corfunc") 287 package_dir["sas.sasgui.perspectives.corfunc"] = os.path.join( 288 "src", "sas", "sasgui", "perspectives", "corfunc") 257 289 packages.extend(["sas.sasgui.perspectives.corfunc"]) 258 290 package_data['sas.sasgui.perspectives.corfunc'] = ['media/*'] 259 291 260 package_dir["sas.sasgui.perspectives.file_converter"] = os.path.join("src", "sas", "sasgui", "perspectives", "file_converter") 292 package_dir["sas.sasgui.perspectives.file_converter"] = os.path.join( 293 "src", "sas", "sasgui", "perspectives", "file_converter") 261 294 packages.extend(["sas.sasgui.perspectives.file_converter"]) 262 295 package_data['sas.sasgui.perspectives.file_converter'] = ['media/*'] 263 296 264 297 # Data util 265 package_dir["sas.sascalc.data_util"] = os.path.join("src", "sas", "sascalc", "data_util") 298 package_dir["sas.sascalc.data_util"] = os.path.join( 299 "src", "sas", "sascalc", "data_util") 266 300 packages.append("sas.sascalc.data_util") 267 301 268 302 # Plottools 269 package_dir["sas.sasgui.plottools"] = os.path.join("src", "sas", "sasgui", "plottools") 303 package_dir["sas.sasgui.plottools"] = os.path.join( 304 "src", "sas", "sasgui", "plottools") 270 305 packages.append("sas.sasgui.plottools") 271 306 … … 275 310 276 311 EXTENSIONS = [".c", ".cpp"] 312 277 313 278 314 def append_file(file_list, dir_path): … … 294 330 file_list.append(os.path.join(sub_dir, new_f)) 295 331 332 296 333 # Comment out the following to avoid rebuilding all the models 297 334 file_sources = [] 298 335 append_file(file_sources, gen_dir) 299 336 300 # Wojtek's hacky way to add doc files while bundling egg301 # def add_doc_files(directory):337 # Wojtek's hacky way to add doc files while bundling egg 338 # def add_doc_files(directory): 302 339 # paths = [] 303 340 # for (path, directories, filenames) in os.walk(directory): … … 332 369 'lxml', 'h5py', 333 370 334 # #The following dependecies won't install automatically, so assume them335 # #The numbers should be bumped up for matplotlib and wxPython as well.371 # The following dependecies won't install automatically, so assume them 372 # The numbers should be bumped up for matplotlib and wxPython as well. 336 373 # 'numpy>=1.4.1', 'scipy>=0.7.2', 'matplotlib>=0.99.1.1', 337 374 # 'wxPython>=2.8.11', 'pil', 338 339 340 if os.name =='nt':375 ] 376 377 if os.name == 'nt': 341 378 required.extend(['html5lib', 'reportlab']) 342 379 else: … … 347 384 setup( 348 385 name="sasview", 349 version =VERSION,350 description ="SasView application",351 author ="SasView Team",352 author_email ="developers@sasview.org",353 url ="http://sasview.org",354 license ="PSF",355 keywords ="small-angle x-ray and neutron scattering analysis",356 download_url ="https://github.com/SasView/sasview.git",357 package_dir =package_dir,358 packages =packages,359 package_data =package_data,360 ext_modules =ext_modules,361 install_requires =required,362 zip_safe =False,363 entry_points ={364 'console_scripts':[365 366 367 368 cmdclass ={'build_ext': build_ext_subclass,369 370 371 386 version=VERSION, 387 description="SasView application", 388 author="SasView Team", 389 author_email="developers@sasview.org", 390 url="http://sasview.org", 391 license="PSF", 392 keywords="small-angle x-ray and neutron scattering analysis", 393 download_url="https://github.com/SasView/sasview.git", 394 package_dir=package_dir, 395 packages=packages, 396 package_data=package_data, 397 ext_modules=ext_modules, 398 install_requires=required, 399 zip_safe=False, 400 entry_points={ 401 'console_scripts': [ 402 "sasview = sas.sasview.sasview:run", 403 ] 404 }, 405 cmdclass={'build_ext': build_ext_subclass, 406 'docs': BuildSphinxCommand, 407 'disable_openmp': DisableOpenMPCommand} 408 )
Note: See TracChangeset
for help on using the changeset viewer.