Changeset bf94e6e in sasmodels


Ignore:
Timestamp:
Mar 5, 2018 6:48:21 PM (4 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
c11d09f, 580904b, a0243f7
Parents:
49d1f8b8
Message:

move compiled dlls from /tmp to ~/.sasmodels/compiled_models on unix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kerneldll.py

    r2d81cfe rbf94e6e  
    158158        return CC + [source, "-o", output, "-lm"] 
    159159 
    160 # Windows-specific solution 
    161 if os.name == 'nt': 
    162     # Assume the default location of module DLLs is in .sasmodels/compiled_models. 
    163     DLL_PATH = os.path.join(os.path.expanduser("~"), ".sasmodels", "compiled_models") 
    164     if not os.path.exists(DLL_PATH): 
    165         os.makedirs(DLL_PATH) 
    166 else: 
    167     # Set up the default path for compiled modules. 
    168     DLL_PATH = tempfile.gettempdir() 
     160# Assume the default location of module DLLs is in .sasmodels/compiled_models. 
     161DLL_PATH = os.path.join(os.path.expanduser("~"), ".sasmodels", "compiled_models") 
    169162 
    170163ALLOW_SINGLE_PRECISION_DLLS = True 
     
    233226 
    234227    Set *sasmodels.kerneldll.DLL_PATH* to the compiled dll output path. 
    235     The default is the system temporary directory. 
     228    The default is in ~/.sasmodels/compiled_models. 
    236229    """ 
    237230    if dtype == F16: 
     
    250243        need_recompile = dll_time < newest_source 
    251244    if need_recompile: 
     245        # Make sure the DLL path exists 
     246        if not os.path.exists(DLL_PATH): 
     247            os.makedirs(DLL_PATH) 
    252248        basename = splitext(os.path.basename(dll))[0] + "_" 
    253249        system_fd, filename = tempfile.mkstemp(suffix=".c", prefix=basename) 
Note: See TracChangeset for help on using the changeset viewer.