Changeset fb69211 in sasmodels


Ignore:
Timestamp:
Apr 27, 2016 11:06:41 AM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
3a45c2c, ff97458
Parents:
9ccf580
Message:

get tinycc exe location from tinycc package

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kerneldll.py

    r29464ba rfb69211  
    4848import sys 
    4949import os 
     50from os.path import join as joinpath, split as splitpath, realpath, splitext 
    5051import tempfile 
    5152import ctypes as ct 
     
    7879        else: 
    7980            COMPILE = " ".join((CC, LN)) 
    80     else: 
    81         # fPIC is unused on windows 
    82         # COMPILE = "gcc -shared -fPIC -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 
     81    elif True:  # Don't use mingw 
     82        # fPIC is not needed on windows 
    8383        COMPILE = "gcc -shared -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 
    8484        if "SAS_OPENMP" in os.environ: 
    8585            COMPILE = COMPILE + " -fopenmp" 
    86         #COMPILE = "z:/tcc/tcc -shared -rdynamic -Wall %(source)s -o %(output)s" 
     86    else: 
     87        from tinycc import TCC 
     88        COMPILE = TCC + " -shared -rdynamic -Wall %(source)s -o %(output)s" 
    8789else: 
    8890    COMPILE = "cc -shared -fPIC -fopenmp -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 
    8991 
    9092# Assume the default location of module DLLs is in top level /models dir. 
    91 DLL_PATH = os.path.join(os.path.split(os.path.realpath(sys.argv[0]))[0], "models") 
     93DLL_PATH = joinpath(splitpath(realpath(sys.argv[0]))[0], "models") 
    9294 
    9395ALLOW_SINGLE_PRECISION_DLLS = True 
     
    98100    Path to the compiled model defined by *model_info*. 
    99101    """ 
    100     from os.path import join as joinpath, split as splitpath, splitext 
    101102    basename = splitext(splitpath(model_info['filename'])[1])[0] 
    102103    if np.dtype(dtype) == generate.F32: 
Note: See TracChangeset for help on using the changeset viewer.