- Timestamp:
- Mar 20, 2016 5:59:32 PM (9 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.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- b85502d
- Parents:
- 0b709f2c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
setup.py
ra62945e r9e531f2 195 195 196 196 # sas.sascalc.calculator 197 package_dir["sas.sascalc.calculator"] =os.path.join("src", "sas", "sascalc", "calculator") 198 packages.extend(["sas.sascalc.calculator"]) 197 numpy_incl_path = os.path.join(NUMPY_INC, "numpy") 198 gen_dir = os.path.join("src", "sas", "sascalc", "calculator", "c_extensions") 199 package_dir["sas.sascalc.calculator.core"] = gen_dir 200 package_dir["sas.sascalc.calculator"] = os.path.join("src", "sas", "sascalc", "calculator") 201 packages.extend(["sas.sascalc.calculator","sas.sascalc.calculator.core"]) 202 ext_modules.append( Extension("sas.sascalc.calculator.core.sld2i", 203 sources = [ 204 os.path.join(gen_dir, "sld2i_module.cpp"), 205 os.path.join(gen_dir, "sld2i.cpp"), 206 os.path.join(gen_dir, "libfunc.c"), 207 os.path.join(gen_dir, "librefl.c"), 208 os.path.join(gen_dir, "winFuncs.c"), 209 ], 210 include_dirs=[numpy_incl_path, gen_dir], 211 ) 212 ) 213 199 214 200 215 # sas.sascalc.pr 201 numpy_incl_path = os.path.join(NUMPY_INC, "numpy")202 216 srcdir = os.path.join("src", "sas", "sascalc", "pr", "c_extensions") 203 217 package_dir["sas.sascalc.pr.core"] = srcdir … … 226 240 227 241 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",#"sas.sasgui.perspectives.fitting.plugin_models" 230 ]) 242 packages.extend(["sas.sasgui.perspectives.fitting"]) 231 243 package_data['sas.sasgui.perspectives.fitting'] = ['media/*'] 232 244 233 packages.extend(["sas.sasgui.perspectives", "sas.sasgui.perspectives.calculator"]) 245 packages.extend(["sas.sasgui.perspectives", "sas.sasgui.perspectives.calculator"]) 234 246 package_data['sas.sasgui.perspectives.calculator'] = ['images/*', 'media/*'] 235 247 … … 242 254 packages.append("sas.sasgui.plottools") 243 255 244 # sas models245 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")253 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_wrappers262 #generate_wrappers(header_dir = includedir,263 # output_dir = model_dir,264 # c_wrapper_dir = wrapper_dir)265 256 266 257 IGNORED_FILES = [".svn"] … … 278 269 _, ext = os.path.splitext(f) 279 270 if ext.lower() in EXTENSIONS and f not in IGNORED_FILES: 280 file_list.append(os.path.join(dir_path, f)) 271 file_list.append(os.path.join(dir_path, f)) 281 272 elif os.path.isdir(os.path.join(dir_path, f)) and \ 282 273 not f.startswith("."): … … 287 278 if ext.lower() in EXTENSIONS and\ 288 279 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) 293 append_file(file_list=model_sources, dir_path=c_model_dir) 294 # append_file(file_list=model_sources, dir_path=wrapper_dir) 295 296 # smear_sources = [] 297 # append_file(file_list=smear_sources, dir_path=smear_dir) 298 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"]) 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")) 311 312 c_models = [ 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 # ), 319 320 # Smearer extension 321 # Extension("sas.models.sas_extension.smearer", 322 # sources = smearer_sources, 323 # include_dirs=[igordir, smear_dir, numpy_incl_path], 324 # ), 325 # 326 # Extension("sas.models.sas_extension.smearer2d_helper", 327 # sources = [ 328 # os.path.join(smear_dir, "smearer2d_helper_module.cpp"), 329 # os.path.join(smear_dir, "smearer2d_helper.cpp"), 330 # os.path.join(igordir, "winFuncs.c"), 331 # ], 332 # include_dirs=[smear_dir, numpy_incl_path], 333 # ), 334 # 335 Extension("sas.models.sas_extension.sld2i", 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"), 341 os.path.join(igordir, "winFuncs.c"), 342 ], 343 include_dirs=[gen_dir, includedir, c_model_dir, numpy_incl_path], 344 ), 345 ] 280 file_list.append(os.path.join(sub_dir, new_f)) 346 281 347 282 # Comment out the following to avoid rebuilding all the models 348 ext_modules.extend(c_models) 349 350 packages.append("sas.models") 283 file_sources = [] 284 append_file(file_sources, gen_dir) 285 351 286 # SasView 352 353 287 package_dir["sas.sasview"] = "sasview" 354 288 package_data['sas.sasview'] = ['images/*',
Note: See TracChangeset
for help on using the changeset viewer.