Changeset 3ecf034 in sasmodels


Ignore:
Timestamp:
May 3, 2016 5:36:51 AM (9 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3c505e6
Parents:
ff97458
Message:

Don't use potentially inaccessible directory, instead create user-specific .sasmodels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kerneldll.py

    rff97458 r3ecf034  
    9292# Windows-specific solution 
    9393if os.name == 'nt': 
    94     # Assume the default location of module DLLs is in top level /models dir. 
    95     # Relying on the Windows installer placing target items in the right place 
    96     DLL_PATH = os.path.join(os.path.split(os.path.realpath(sys.argv[0]))[0], "models") 
     94    # Assume the default location of module DLLs is in .sasmodels/compiled_models. 
     95    DLL_PATH = os.path.join(os.path.expanduser("~"), ".sasmodels", "compiled_models") 
     96    if not os.path.exists(DLL_PATH): 
     97        os.makedirs(DLL_PATH) 
    9798else: 
    9899    # Set up the default path for compiled modules. 
Note: See TracChangeset for help on using the changeset viewer.