Changeset f0858b6 in sasview


Ignore:
Timestamp:
Sep 15, 2016 8:33:57 AM (5 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
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
Children:
b742b2b9
Parents:
762ee3e
git-author:
Piotr Rozyczko <piotr.rozyczko@…> (08/12/16 03:54:23)
git-committer:
Piotr Rozyczko <rozyczko@…> (09/15/16 08:33:57)
Message:

Added numerical library checks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasview/setup_exe.py

    r70b7d778 rf0858b6  
    243243    data_files.append(('.', [f])) 
    244244 
    245 # atlas DLL required by matplotlib 11.1 
    246 # ** REVISIT WHEN MOVING TO ANACONDA ** 
    247 f = "c:\\python27\\lib\\site-packages\\numpy\\core\\numpy-atlas.dll" 
    248 if os.path.isfile(f): 
    249     data_files.append(('.', [f])) 
    250      
     245# numerical libraries 
     246def dll_check(dll_path, dlls): 
     247    dll_includes = [os.path.join(dll_path, dll+'.dll') for dll in dlls] 
     248    return [dll for dll in dll_includes if os.path.exists(dll)] 
     249 
     250python_root = os.path.dirname(os.path.abspath(sys.executable)) 
     251# Check for ATLAS 
     252dll_path = os.path.join(python_root, 'lib', 'site-packages', 'numpy', 'core') 
     253dlls = ['numpy-atlas'] 
     254atlas_dlls = dll_check(dll_path, dlls) 
     255 
     256# Check for MKL 
     257dll_path = os.path.join(python_root, 'Library', 'bin') 
     258dlls = ['mkl_core', 'mkl_def', 'libiomp5md'] 
     259mkl_dlls = dll_check(dll_path, dlls) 
     260 
     261if atlas_dlls: 
     262    data_files.append(('.', atlas_dlls)) 
     263elif mkl_dlls: 
     264    data_files.append(('.', mkl_dlls)) 
     265 
    251266if os.path.isfile("BUILD_NUMBER"): 
    252267    data_files.append(('.', ["BUILD_NUMBER"])) 
Note: See TracChangeset for help on using the changeset viewer.