Changeset 29464ba in sasmodels


Ignore:
Timestamp:
Apr 27, 2016 6:26:19 AM (8 years ago)
Author:
piotr
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:
9ccf580
Parents:
a062d18
Message:

Separate location for precompiled dlls. Py2exe on windows doesn't allow bundling non-py files insise the zip.

Location:
sasmodels
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kerneldll.py

    r2a55a6f r29464ba  
    8888    COMPILE = "cc -shared -fPIC -fopenmp -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 
    8989 
    90 # Assume the default location of module DLLs is within the sasmodel directory. 
    91 DLL_PATH = os.path.join(os.path.split(os.path.realpath(__file__))[0], "models", "dll") 
     90# Assume the default location of module DLLs is in top level /models dir. 
     91DLL_PATH = os.path.join(os.path.split(os.path.realpath(sys.argv[0]))[0], "models") 
    9292 
    9393ALLOW_SINGLE_PRECISION_DLLS = True 
     
    154154        os.fdopen(fid, "w").write(source) 
    155155        command = COMPILE%{"source":filename, "output":dll} 
    156         print("Compile command: "+command) 
    157156        status = os.system(command) 
    158157        if status != 0 or not os.path.exists(dll): 
  • sasmodels/models/__init__.py

    r1ca1fd9 r29464ba  
    5353    for f in im_list: 
    5454        data_files.append(('media/models_media/img', [f])) 
     55 
     56    # Add precompiled models dlls to the top level directory "models" 
     57    path_img = get_data_path(media=os.path.join("sasmodels","sasmodels","models","dll")) 
     58    is_list = findall(path_img) 
     59    for f in is_list: 
     60        if os.path.splitext(f)[1] == ".so": 
     61            data_files.append(('models', [f])) 
     62 
    5563    return data_files 
    5664 
Note: See TracChangeset for help on using the changeset viewer.