Changes in setup.py [e791cca:5881b17] in sasview
Legend:
- Unmodified
- Added
- Removed
-
setup.py
re791cca r5881b17 9 9 from distutils.command.build_ext import build_ext 10 10 from distutils.core import Command 11 from shutil import rmtree 12 13 try: 14 from numpy.distutils.misc_util import get_numpy_include_dirs 15 NUMPY_INC = get_numpy_include_dirs()[0] 16 except: 17 try: 18 import numpy 19 NUMPY_INC = os.path.join(os.path.split(numpy.__file__)[0], 20 "core","include") 21 except: 22 msg = "\nNumpy is needed to build SasView. " 23 print msg, "Try easy_install numpy.\n %s" % str(sys.exc_value) 24 sys.exit(0) 11 25 12 26 # Manage version number ###################################### … … 24 38 # except when there is no such file 25 39 # Todo : make this list generic 26 # 40 #plugin_model_list = ['polynominal5.py', 'sph_bessel_jn.py', 27 41 # 'sum_Ap1_1_Ap2.py', 'sum_p1_p2.py', 28 42 # 'testmodel_2.py', 'testmodel.py', … … 45 59 if os.path.isfile(f_path): 46 60 os.remove(f_path) 47 # 48 # 61 #f_path = os.path.join(sas_dir, 'plugin_models') 62 #if os.path.isdir(f_path): 49 63 # for f in os.listdir(f_path): 50 64 # if f in plugin_model_list: … … 190 204 191 205 # sas.sascalc.calculator 206 numpy_incl_path = os.path.join(NUMPY_INC, "numpy") 192 207 gen_dir = os.path.join("src", "sas", "sascalc", "calculator", "c_extensions") 193 208 package_dir["sas.sascalc.calculator.core"] = gen_dir … … 200 215 os.path.join(gen_dir, "libfunc.c"), 201 216 os.path.join(gen_dir, "librefl.c"), 217 os.path.join(gen_dir, "winFuncs.c"), 202 218 ], 203 include_dirs=[ gen_dir],219 include_dirs=[numpy_incl_path, gen_dir], 204 220 ) 205 221 ) … … 215 231 os.path.join(srcdir, "invertor.c"), 216 232 ], 217 include_dirs=[ ],233 include_dirs=[numpy_incl_path], 218 234 ) ) 219 235 … … 233 249 234 250 package_dir["sas.sasgui.perspectives.fitting"] = os.path.join("src", "sas", "sasgui", "perspectives", "fitting") 235 package_dir["sas.sasgui.perspectives.fitting.plugin_models"] = os.path.join("src", "sas", "sasgui", "perspectives", "fitting", "plugin_models") 236 packages.extend(["sas.sasgui.perspectives.fitting", "sas.sasgui.perspectives.fitting.plugin_models"]) 237 package_data['sas.sasgui.perspectives.fitting'] = ['media/*', 'plugin_models/*'] 251 packages.extend(["sas.sasgui.perspectives.fitting"]) 252 package_data['sas.sasgui.perspectives.fitting'] = ['media/*'] 238 253 239 254 packages.extend(["sas.sasgui.perspectives", "sas.sasgui.perspectives.calculator"]) … … 251 266 # package_dir["sas.models"] = os.path.join("src", "sas", "models") 252 267 # packages.append("sas.models") 268 269 IGNORED_FILES = [".svn"] 270 if not os.name=='nt': 271 IGNORED_FILES.extend(["gamma_win.c","winFuncs.c"]) 253 272 254 273 EXTENSIONS = [".c", ".cpp"] … … 261 280 if os.path.isfile(os.path.join(dir_path, f)): 262 281 _, ext = os.path.splitext(f) 263 if ext.lower() in EXTENSIONS :282 if ext.lower() in EXTENSIONS and f not in IGNORED_FILES: 264 283 file_list.append(os.path.join(dir_path, f)) 265 284 elif os.path.isdir(os.path.join(dir_path, f)) and \ … … 269 288 if os.path.isfile(os.path.join(sub_dir, new_f)): 270 289 _, ext = os.path.splitext(new_f) 271 if ext.lower() in EXTENSIONS: 290 if ext.lower() in EXTENSIONS and\ 291 new_f not in IGNORED_FILES: 272 292 file_list.append(os.path.join(sub_dir, new_f)) 273 293 … … 276 296 append_file(file_sources, gen_dir) 277 297 298 #Wojtek's hacky way to add doc files while bundling egg 299 #def add_doc_files(directory): 300 # paths = [] 301 # for (path, directories, filenames) in os.walk(directory): 302 # for filename in filenames: 303 # paths.append(os.path.join(path, filename)) 304 # return paths 305 306 #doc_files = add_doc_files('doc') 307 278 308 # SasView 279 309 package_dir["sas.sasview"] = "sasview" 280 package_data['sas.sasview'] = ['images/*', 310 package_data['sas.sasview'] = ['images/*', 281 311 'media/*', 282 312 'test/*.txt', … … 289 319 290 320 required = [ 291 'bumps>=0.7.5. 9', 'periodictable>=1.3.1', 'pyparsing<2.0.0',321 'bumps>=0.7.5.6', 'periodictable>=1.3.1', 'pyparsing<2.0.0', 292 322 293 323 # 'lxml>=2.2.2', … … 303 333 required.extend(['html5lib', 'reportlab']) 304 334 else: 305 # 'pil' is now called 'pillow' 306 required.extend(['pillow']) 335 required.extend(['pil']) 307 336 308 337 # Set up SasView
Note: See TracChangeset
for help on using the changeset viewer.