[d6bc28cf] | 1 | """ |
---|
[c329f4d] | 2 | Setup for SasView |
---|
[d6bc28cf] | 3 | #TODO: Add checks to see that all the dependencies are on the system |
---|
| 4 | """ |
---|
[8ab3302] | 5 | import sys |
---|
[d6bc28cf] | 6 | import os |
---|
[5980b1a] | 7 | from setuptools import setup, Extension |
---|
[2cef9d3] | 8 | from distutils.command.build_ext import build_ext |
---|
[968aa6e] | 9 | from distutils.core import Command |
---|
| 10 | |
---|
[e13ef7f] | 11 | try: |
---|
| 12 | from numpy.distutils.misc_util import get_numpy_include_dirs |
---|
| 13 | NUMPY_INC = get_numpy_include_dirs()[0] |
---|
| 14 | except: |
---|
[cb5fb4a] | 15 | try: |
---|
[e13ef7f] | 16 | import numpy |
---|
[8ab3302] | 17 | NUMPY_INC = os.path.join(os.path.split(numpy.__file__)[0], |
---|
| 18 | "core","include") |
---|
[cb5fb4a] | 19 | except: |
---|
[c329f4d] | 20 | msg = "\nNumpy is needed to build SasView. " |
---|
[8ab3302] | 21 | print msg, "Try easy_install numpy.\n %s" % str(sys.exc_value) |
---|
[e13ef7f] | 22 | sys.exit(0) |
---|
[d6bc28cf] | 23 | |
---|
[5548954] | 24 | # Manage version number ###################################### |
---|
[3a39c2e] | 25 | import sasview |
---|
| 26 | VERSION = sasview.__version__ |
---|
[5548954] | 27 | ############################################################## |
---|
| 28 | |
---|
[d6bc28cf] | 29 | package_dir = {} |
---|
| 30 | package_data = {} |
---|
| 31 | packages = [] |
---|
| 32 | ext_modules = [] |
---|
| 33 | |
---|
[8ab3302] | 34 | # Remove all files that should be updated by this setup |
---|
[3a39c2e] | 35 | # We do this here because application updates these files from .sasview |
---|
[8ab3302] | 36 | # except when there is no such file |
---|
| 37 | # Todo : make this list generic |
---|
| 38 | plugin_model_list = ['polynominal5.py', 'sph_bessel_jn.py', |
---|
| 39 | 'sum_Ap1_1_Ap2.py', 'sum_p1_p2.py', |
---|
[b30ed8f] | 40 | 'testmodel_2.py', 'testmodel.py', |
---|
| 41 | 'polynominal5.pyc', 'sph_bessel_jn.pyc', |
---|
| 42 | 'sum_Ap1_1_Ap2.pyc', 'sum_p1_p2.pyc', |
---|
[eb32080e] | 43 | 'testmodel_2.pyc', 'testmodel.pyc', 'plugins.log'] |
---|
[3a39c2e] | 44 | sas_dir = os.path.join(os.path.expanduser("~"),'.sasview') |
---|
| 45 | if os.path.isdir(sas_dir): |
---|
| 46 | f_path = os.path.join(sas_dir, "sasview.log") |
---|
[e615a0d] | 47 | if os.path.isfile(f_path): |
---|
| 48 | os.remove(f_path) |
---|
[3a39c2e] | 49 | f_path = os.path.join(sas_dir, "serialized_cat.json") |
---|
[ea5fa58] | 50 | if os.path.isfile(f_path): |
---|
| 51 | os.remove(f_path) |
---|
[3a39c2e] | 52 | f_path = os.path.join(sas_dir, 'config', "custom_config.py") |
---|
[e615a0d] | 53 | if os.path.isfile(f_path): |
---|
| 54 | os.remove(f_path) |
---|
[3a39c2e] | 55 | f_path = os.path.join(sas_dir, 'plugin_models') |
---|
[e615a0d] | 56 | if os.path.isdir(f_path): |
---|
[5980b1a] | 57 | for f in os.listdir(f_path): |
---|
| 58 | if f in plugin_model_list: |
---|
| 59 | file_path = os.path.join(f_path, f) |
---|
[e615a0d] | 60 | os.remove(file_path) |
---|
| 61 | |
---|
| 62 | # 'sys.maxsize' and 64bit: Not supported for python2.5 |
---|
| 63 | is_64bits = False |
---|
| 64 | if sys.version_info >= (2, 6): |
---|
| 65 | is_64bits = sys.maxsize > 2**32 |
---|
| 66 | |
---|
[7a04dbb] | 67 | enable_openmp = False |
---|
[e79a467] | 68 | |
---|
[f468791] | 69 | if sys.platform =='darwin': |
---|
| 70 | if not is_64bits: |
---|
| 71 | # Disable OpenMP |
---|
| 72 | enable_openmp = False |
---|
| 73 | else: |
---|
| 74 | # Newer versions of Darwin don't support openmp |
---|
| 75 | try: |
---|
| 76 | darwin_ver = int(os.uname()[2].split('.')[0]) |
---|
| 77 | if darwin_ver >= 12: |
---|
| 78 | enable_openmp = False |
---|
| 79 | except: |
---|
| 80 | print "PROBLEM determining Darwin version" |
---|
[b30ed8f] | 81 | |
---|
| 82 | # Options to enable OpenMP |
---|
| 83 | copt = {'msvc': ['/openmp'], |
---|
| 84 | 'mingw32' : ['-fopenmp'], |
---|
| 85 | 'unix' : ['-fopenmp']} |
---|
| 86 | lopt = {'msvc': ['/MANIFEST'], |
---|
| 87 | 'mingw32' : ['-fopenmp'], |
---|
| 88 | 'unix' : ['-lgomp']} |
---|
[13f00a0] | 89 | |
---|
[ebdb833] | 90 | # Platform-specific link options |
---|
| 91 | platform_lopt = {'msvc' : ['/MANIFEST']} |
---|
[307fa4f] | 92 | platform_copt = {} |
---|
[b9c8fc5] | 93 | |
---|
| 94 | # Set copts to get compile working on OS X >= 10.9 using clang |
---|
| 95 | if sys.platform =='darwin': |
---|
| 96 | try: |
---|
| 97 | darwin_ver = int(os.uname()[2].split('.')[0]) |
---|
[4adf48e] | 98 | if darwin_ver >= 13 and darwin_ver < 14: |
---|
[b9c8fc5] | 99 | platform_copt = {'unix' : ['-Wno-error=unused-command-line-argument-hard-error-in-future']} |
---|
| 100 | except: |
---|
| 101 | print "PROBLEM determining Darwin version" |
---|
| 102 | |
---|
[5972029] | 103 | class DisableOpenMPCommand(Command): |
---|
| 104 | description = "The version of MinGW that comes with Anaconda does not come with OpenMP :( "\ |
---|
| 105 | "This commands means we can turn off compiling with OpenMP for this or any "\ |
---|
| 106 | "other reason." |
---|
| 107 | user_options = [] |
---|
| 108 | |
---|
| 109 | def initialize_options(self): |
---|
| 110 | self.cwd = None |
---|
| 111 | |
---|
| 112 | def finalize_options(self): |
---|
| 113 | self.cwd = os.getcwd() |
---|
| 114 | global enable_openmp |
---|
| 115 | enable_openmp = False |
---|
[1829835] | 116 | |
---|
[5972029] | 117 | def run(self): |
---|
| 118 | pass |
---|
[ebdb833] | 119 | |
---|
[13f00a0] | 120 | class build_ext_subclass( build_ext ): |
---|
| 121 | def build_extensions(self): |
---|
| 122 | # Get 64-bitness |
---|
| 123 | c = self.compiler.compiler_type |
---|
| 124 | print "Compiling with %s (64bit=%s)" % (c, str(is_64bits)) |
---|
| 125 | |
---|
[ebdb833] | 126 | # OpenMP build options |
---|
[b30ed8f] | 127 | if enable_openmp: |
---|
[13f00a0] | 128 | if copt.has_key(c): |
---|
[5980b1a] | 129 | for e in self.extensions: |
---|
| 130 | e.extra_compile_args = copt[ c ] |
---|
[13f00a0] | 131 | if lopt.has_key(c): |
---|
| 132 | for e in self.extensions: |
---|
| 133 | e.extra_link_args = lopt[ c ] |
---|
| 134 | |
---|
[ebdb833] | 135 | # Platform-specific build options |
---|
| 136 | if platform_lopt.has_key(c): |
---|
| 137 | for e in self.extensions: |
---|
| 138 | e.extra_link_args = platform_lopt[ c ] |
---|
| 139 | |
---|
[1829835] | 140 | if platform_copt.has_key(c): |
---|
| 141 | for e in self.extensions: |
---|
| 142 | e.extra_compile_args = platform_copt[ c ] |
---|
| 143 | |
---|
| 144 | |
---|
[13f00a0] | 145 | build_ext.build_extensions(self) |
---|
[d6bc28cf] | 146 | |
---|
[968aa6e] | 147 | class BuildSphinxCommand(Command): |
---|
| 148 | description = "Build Sphinx documentation." |
---|
| 149 | user_options = [] |
---|
| 150 | |
---|
| 151 | def initialize_options(self): |
---|
| 152 | self.cwd = None |
---|
| 153 | |
---|
| 154 | def finalize_options(self): |
---|
| 155 | self.cwd = os.getcwd() |
---|
| 156 | |
---|
[d8c4019] | 157 | def run(self): |
---|
| 158 | sys.path.append("docs/sphinx-docs") |
---|
| 159 | import build_sphinx |
---|
[c2ee2b1] | 160 | build_sphinx.rebuild() |
---|
[968aa6e] | 161 | |
---|
[3a39c2e] | 162 | # sas module |
---|
| 163 | package_dir["sas"] = os.path.join("src", "sas") |
---|
| 164 | packages.append("sas") |
---|
[29e96f3] | 165 | |
---|
[e0bbb7c] | 166 | # sas module |
---|
| 167 | package_dir["sas.sasgui"] = os.path.join("src", "sas", "sasgui") |
---|
| 168 | packages.append("sas.sasgui") |
---|
| 169 | |
---|
| 170 | # sas module |
---|
| 171 | package_dir["sas.sascalc"] = os.path.join("src", "sas", "sascalc") |
---|
| 172 | packages.append("sas.sascalc") |
---|
| 173 | |
---|
| 174 | # sas.sascalc.invariant |
---|
| 175 | package_dir["sas.sascalc.invariant"] = os.path.join("src", "sas", "sascalc", "invariant") |
---|
| 176 | packages.extend(["sas.sascalc.invariant"]) |
---|
[d6bc28cf] | 177 | |
---|
[d85c194] | 178 | # sas.sasgui.guiframe |
---|
| 179 | guiframe_path = os.path.join("src", "sas", "sasgui", "guiframe") |
---|
| 180 | package_dir["sas.sasgui.guiframe"] = guiframe_path |
---|
| 181 | package_dir["sas.sasgui.guiframe.local_perspectives"] = os.path.join(os.path.join(guiframe_path, "local_perspectives")) |
---|
| 182 | package_data["sas.sasgui.guiframe"] = ['images/*', 'media/*'] |
---|
| 183 | packages.extend(["sas.sasgui.guiframe", "sas.sasgui.guiframe.local_perspectives"]) |
---|
[d6bc28cf] | 184 | # build local plugin |
---|
[5980b1a] | 185 | for d in os.listdir(os.path.join(guiframe_path, "local_perspectives")): |
---|
| 186 | if d not in ['.svn','__init__.py', '__init__.pyc']: |
---|
[d85c194] | 187 | package_name = "sas.sasgui.guiframe.local_perspectives." + d |
---|
[3d24489] | 188 | packages.append(package_name) |
---|
[5980b1a] | 189 | package_dir[package_name] = os.path.join(guiframe_path, "local_perspectives", d) |
---|
[d6bc28cf] | 190 | |
---|
[e0bbb7c] | 191 | # sas.sascalc.dataloader |
---|
| 192 | package_dir["sas.sascalc.dataloader"] = os.path.join("src", "sas", "sascalc", "dataloader") |
---|
| 193 | package_data["sas.sascalc.dataloader.readers"] = ['defaults.json','schema/*.xsd'] |
---|
| 194 | packages.extend(["sas.sascalc.dataloader","sas.sascalc.dataloader.readers","sas.sascalc.dataloader.readers.schema"]) |
---|
[d6bc28cf] | 195 | |
---|
[e0bbb7c] | 196 | # sas.sascalc.calculator |
---|
| 197 | package_dir["sas.sascalc.calculator"] =os.path.join("src", "sas", "sascalc", "calculator") |
---|
[b699768] | 198 | packages.extend(["sas.sascalc.calculator"]) |
---|
[d6bc28cf] | 199 | |
---|
[b699768] | 200 | # sas.sascalc.pr |
---|
[cb5fb4a] | 201 | numpy_incl_path = os.path.join(NUMPY_INC, "numpy") |
---|
[b699768] | 202 | srcdir = os.path.join("src", "sas", "sascalc", "pr", "c_extensions") |
---|
| 203 | package_dir["sas.sascalc.pr.core"] = srcdir |
---|
| 204 | package_dir["sas.sascalc.pr"] = os.path.join("src","sas", "sascalc", "pr") |
---|
| 205 | packages.extend(["sas.sascalc.pr","sas.sascalc.pr.core"]) |
---|
| 206 | ext_modules.append( Extension("sas.sascalc.pr.core.pr_inversion", |
---|
[3d24489] | 207 | sources = [os.path.join(srcdir, "Cinvertor.c"), |
---|
[29e96f3] | 208 | os.path.join(srcdir, "invertor.c"), |
---|
| 209 | ], |
---|
| 210 | include_dirs=[numpy_incl_path], |
---|
| 211 | ) ) |
---|
[d6bc28cf] | 212 | |
---|
[b699768] | 213 | # sas.sascalc.fit |
---|
| 214 | package_dir["sas.sascalc.fit"] = os.path.join("src", "sas", "sascalc", "fit") |
---|
| 215 | packages.append("sas.sascalc.fit") |
---|
[3d24489] | 216 | |
---|
| 217 | # Perspectives |
---|
[d85c194] | 218 | package_dir["sas.sasgui.perspectives"] = os.path.join("src", "sas", "sasgui", "perspectives") |
---|
| 219 | package_dir["sas.sasgui.perspectives.pr"] = os.path.join("src", "sas", "sasgui", "perspectives", "pr") |
---|
| 220 | packages.extend(["sas.sasgui.perspectives","sas.sasgui.perspectives.pr"]) |
---|
| 221 | package_data["sas.sasgui.perspectives.pr"] = ['images/*'] |
---|
| 222 | |
---|
| 223 | package_dir["sas.sasgui.perspectives.invariant"] = os.path.join("src", "sas", "sasgui", "perspectives", "invariant") |
---|
| 224 | packages.extend(["sas.sasgui.perspectives.invariant"]) |
---|
| 225 | package_data['sas.sasgui.perspectives.invariant'] = [os.path.join("media",'*')] |
---|
| 226 | |
---|
| 227 | package_dir["sas.sasgui.perspectives.fitting"] = os.path.join("src", "sas", "sasgui", "perspectives", "fitting") |
---|
| 228 | package_dir["sas.sasgui.perspectives.fitting.plugin_models"] = os.path.join("src", "sas", "sasgui", "perspectives", "fitting", "plugin_models") |
---|
| 229 | packages.extend(["sas.sasgui.perspectives.fitting", |
---|
| 230 | "sas.sasgui.perspectives.fitting.plugin_models"]) |
---|
| 231 | package_data['sas.sasgui.perspectives.fitting'] = ['media/*','plugin_models/*'] |
---|
| 232 | |
---|
| 233 | packages.extend(["sas.sasgui.perspectives", "sas.sasgui.perspectives.calculator"]) |
---|
| 234 | package_data['sas.sasgui.perspectives.calculator'] = ['images/*', 'media/*'] |
---|
[3d24489] | 235 | |
---|
[d6bc28cf] | 236 | # Data util |
---|
[e0bbb7c] | 237 | package_dir["sas.sascalc.data_util"] = os.path.join("src", "sas", "sascalc", "data_util") |
---|
[b699768] | 238 | packages.append("sas.sascalc.data_util") |
---|
[d6bc28cf] | 239 | |
---|
| 240 | # Plottools |
---|
[d7bb526] | 241 | package_dir["sas.sasgui.plottools"] = os.path.join("src", "sas", "sasgui", "plottools") |
---|
| 242 | packages.append("sas.sasgui.plottools") |
---|
[d6bc28cf] | 243 | |
---|
[3a39c2e] | 244 | # sas models |
---|
| 245 | includedir = os.path.join("src", "sas", "models", "include") |
---|
| 246 | igordir = os.path.join("src", "sas", "models", "c_extension", "libigor") |
---|
| 247 | cephes_dir = os.path.join("src", "sas", "models", "c_extension", "cephes") |
---|
| 248 | c_model_dir = os.path.join("src", "sas", "models", "c_extension", "c_models") |
---|
| 249 | smear_dir = os.path.join("src", "sas", "models", "c_extension", "c_smearer") |
---|
| 250 | gen_dir = os.path.join("src", "sas", "models", "c_extension", "c_gen") |
---|
| 251 | wrapper_dir = os.path.join("src", "sas", "models", "c_extension", "python_wrapper", "generated") |
---|
| 252 | model_dir = os.path.join("src", "sas","models") |
---|
[082c565] | 253 | |
---|
[0e4e554] | 254 | #if os.path.isdir(wrapper_dir): |
---|
| 255 | # for file in os.listdir(wrapper_dir): |
---|
| 256 | # file_path = os.path.join(wrapper_dir, file) |
---|
| 257 | # os.remove(file_path) |
---|
| 258 | #else: |
---|
| 259 | # os.makedirs(wrapper_dir) |
---|
| 260 | #sys.path.append(os.path.join("src", "sas", "models", "c_extension", "python_wrapper")) |
---|
| 261 | #from wrapping import generate_wrappers |
---|
| 262 | #generate_wrappers(header_dir = includedir, |
---|
| 263 | # output_dir = model_dir, |
---|
| 264 | # c_wrapper_dir = wrapper_dir) |
---|
[2d1b700] | 265 | |
---|
[101065a] | 266 | IGNORED_FILES = [".svn"] |
---|
[9cde4cc] | 267 | if not os.name=='nt': |
---|
[2c63e80e] | 268 | IGNORED_FILES.extend(["gamma_win.c","winFuncs.c"]) |
---|
[9cde4cc] | 269 | |
---|
[d6bc28cf] | 270 | EXTENSIONS = [".c", ".cpp"] |
---|
| 271 | |
---|
| 272 | def append_file(file_list, dir_path): |
---|
| 273 | """ |
---|
| 274 | Add sources file to sources |
---|
| 275 | """ |
---|
| 276 | for f in os.listdir(dir_path): |
---|
| 277 | if os.path.isfile(os.path.join(dir_path, f)): |
---|
| 278 | _, ext = os.path.splitext(f) |
---|
| 279 | if ext.lower() in EXTENSIONS and f not in IGNORED_FILES: |
---|
| 280 | file_list.append(os.path.join(dir_path, f)) |
---|
| 281 | elif os.path.isdir(os.path.join(dir_path, f)) and \ |
---|
| 282 | not f.startswith("."): |
---|
| 283 | sub_dir = os.path.join(dir_path, f) |
---|
| 284 | for new_f in os.listdir(sub_dir): |
---|
| 285 | if os.path.isfile(os.path.join(sub_dir, new_f)): |
---|
| 286 | _, ext = os.path.splitext(new_f) |
---|
| 287 | if ext.lower() in EXTENSIONS and\ |
---|
| 288 | new_f not in IGNORED_FILES: |
---|
| 289 | file_list.append(os.path.join(sub_dir, new_f)) |
---|
| 290 | |
---|
| 291 | model_sources = [] |
---|
| 292 | append_file(file_list=model_sources, dir_path=igordir) |
---|
[0e4e554] | 293 | #append_file(file_list=model_sources, dir_path=c_model_dir) |
---|
| 294 | #append_file(file_list=model_sources, dir_path=wrapper_dir) |
---|
[67424cd] | 295 | |
---|
[d6bc28cf] | 296 | smear_sources = [] |
---|
| 297 | append_file(file_list=smear_sources, dir_path=smear_dir) |
---|
| 298 | |
---|
[3a39c2e] | 299 | package_dir["sas.models"] = model_dir |
---|
| 300 | package_dir["sas.models.sas_extension"] = os.path.join("src", "sas", "models", "sas_extension") |
---|
| 301 | package_data['sas.models'] = [os.path.join('media', "*.*")] |
---|
| 302 | package_data['sas.models'] += [os.path.join('media','img', "*.*")] |
---|
| 303 | packages.extend(["sas.models","sas.models.sas_extension"]) |
---|
[5980b1a] | 304 | |
---|
| 305 | smearer_sources = [os.path.join(smear_dir, "smearer.cpp"), |
---|
| 306 | os.path.join(smear_dir, "smearer_module.cpp")] |
---|
| 307 | geni_sources = [os.path.join(gen_dir, "sld2i_module.cpp")] |
---|
| 308 | if os.name=='nt': |
---|
| 309 | smearer_sources.append(os.path.join(igordir, "winFuncs.c")) |
---|
| 310 | geni_sources.append(os.path.join(igordir, "winFuncs.c")) |
---|
[820df88] | 311 | |
---|
| 312 | c_models = [ |
---|
[0e4e554] | 313 | #Extension("sas.models.sas_extension.c_models", |
---|
| 314 | # sources=model_sources, |
---|
| 315 | # include_dirs=[ |
---|
| 316 | # igordir, includedir, c_model_dir, numpy_incl_path, cephes_dir |
---|
| 317 | # ], |
---|
| 318 | #), |
---|
[820df88] | 319 | |
---|
| 320 | # Smearer extension |
---|
[3a39c2e] | 321 | Extension("sas.models.sas_extension.smearer", |
---|
[820df88] | 322 | sources = smearer_sources, |
---|
| 323 | include_dirs=[igordir, smear_dir, numpy_incl_path], |
---|
| 324 | ), |
---|
[5980b1a] | 325 | |
---|
[3a39c2e] | 326 | Extension("sas.models.sas_extension.smearer2d_helper", |
---|
[820df88] | 327 | sources = [ |
---|
| 328 | os.path.join(smear_dir, "smearer2d_helper_module.cpp"), |
---|
| 329 | os.path.join(smear_dir, "smearer2d_helper.cpp"), |
---|
[a6d2e3b] | 330 | os.path.join(igordir, "winFuncs.c"), |
---|
[820df88] | 331 | ], |
---|
| 332 | include_dirs=[smear_dir, numpy_incl_path], |
---|
| 333 | ), |
---|
[5980b1a] | 334 | |
---|
[3a39c2e] | 335 | Extension("sas.models.sas_extension.sld2i", |
---|
[820df88] | 336 | sources = [ |
---|
| 337 | os.path.join(gen_dir, "sld2i_module.cpp"), |
---|
| 338 | os.path.join(gen_dir, "sld2i.cpp"), |
---|
| 339 | os.path.join(c_model_dir, "libfunc.c"), |
---|
| 340 | os.path.join(c_model_dir, "librefl.c"), |
---|
[a6d2e3b] | 341 | os.path.join(igordir, "winFuncs.c"), |
---|
[820df88] | 342 | ], |
---|
| 343 | include_dirs=[gen_dir, includedir, c_model_dir, numpy_incl_path], |
---|
| 344 | ), |
---|
| 345 | ] |
---|
| 346 | |
---|
| 347 | # Comment out the following to avoid rebuilding all the models |
---|
| 348 | ext_modules.extend(c_models) |
---|
| 349 | |
---|
[0e4e554] | 350 | packages.append("sas.models") |
---|
[c329f4d] | 351 | # SasView |
---|
[df7a7e3] | 352 | |
---|
[3a39c2e] | 353 | package_dir["sas.sasview"] = "sasview" |
---|
[bbb8a56] | 354 | package_data['sas.sasview'] = ['images/*', |
---|
| 355 | 'media/*', |
---|
[d4c88e24] | 356 | 'test/*.txt', |
---|
[bbb8a56] | 357 | 'test/1d_data/*', |
---|
| 358 | 'test/2d_data/*', |
---|
| 359 | 'test/save_states/*', |
---|
| 360 | 'test/upcoming_formats/*', |
---|
[27b7acc] | 361 | 'default_categories.json'] |
---|
[3a39c2e] | 362 | packages.append("sas.sasview") |
---|
[d6bc28cf] | 363 | |
---|
[9f32c57] | 364 | required = [ |
---|
[9d5427f] | 365 | 'bumps>=0.7.5.6', 'periodictable>=1.3.1', 'pyparsing<2.0.0', |
---|
[9f32c57] | 366 | |
---|
| 367 | # 'lxml>=2.2.2', |
---|
| 368 | 'lxml', |
---|
| 369 | |
---|
| 370 | ## The following dependecies won't install automatically, so assume them |
---|
| 371 | ## The numbers should be bumped up for matplotlib and wxPython as well. |
---|
| 372 | # 'numpy>=1.4.1', 'scipy>=0.7.2', 'matplotlib>=0.99.1.1', |
---|
| 373 | # 'wxPython>=2.8.11', 'pil', |
---|
| 374 | ] |
---|
[213b445] | 375 | |
---|
[95fe70d] | 376 | if os.name=='nt': |
---|
[7a211030] | 377 | required.extend(['html5lib', 'reportlab']) |
---|
[7f59928e] | 378 | else: |
---|
[202c1ef] | 379 | required.extend(['pil']) |
---|
[30ad350] | 380 | |
---|
[5980b1a] | 381 | # Set up SasView |
---|
[d6bc28cf] | 382 | setup( |
---|
[c329f4d] | 383 | name="sasview", |
---|
[5548954] | 384 | version = VERSION, |
---|
[c329f4d] | 385 | description = "SasView application", |
---|
[038ccfe6] | 386 | author = "SasView Team", |
---|
| 387 | author_email = "developers@sasview.org", |
---|
[5980b1a] | 388 | url = "http://sasview.org", |
---|
[d6bc28cf] | 389 | license = "PSF", |
---|
[c329f4d] | 390 | keywords = "small-angle x-ray and neutron scattering analysis", |
---|
[038ccfe6] | 391 | download_url = "https://github.com/SasView/sasview.git", |
---|
[d6bc28cf] | 392 | package_dir = package_dir, |
---|
| 393 | packages = packages, |
---|
| 394 | package_data = package_data, |
---|
| 395 | ext_modules = ext_modules, |
---|
| 396 | install_requires = required, |
---|
[60f7d19] | 397 | zip_safe = False, |
---|
[a7b774d] | 398 | entry_points = { |
---|
| 399 | 'console_scripts':[ |
---|
[3a39c2e] | 400 | "sasview = sas.sasview.sasview:run", |
---|
[a7b774d] | 401 | ] |
---|
[13f00a0] | 402 | }, |
---|
[968aa6e] | 403 | cmdclass = {'build_ext': build_ext_subclass, |
---|
[5972029] | 404 | 'docs': BuildSphinxCommand, |
---|
| 405 | 'disable_openmp': DisableOpenMPCommand} |
---|
[d113531] | 406 | ) |
---|