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