Changeset 381b1f0 in sasmodels
- Timestamp:
- Apr 14, 2016 5:44:48 AM (9 years ago)
- Children:
- 78cbdb9
- Parents:
- 53215cf
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kerneldll.py
r6ad0e87 r381b1f0 79 79 COMPILE = " ".join((CC, LN)) 80 80 else: 81 COMPILE = "gcc -shared -fPIC -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 81 # fPIC is unused on windows 82 # COMPILE = "gcc -shared -fPIC -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 83 COMPILE = "gcc -shared -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 82 84 if "SAS_OPENMP" in os.environ: 83 85 COMPILE = COMPILE + " -fopenmp" … … 85 87 COMPILE = "cc -shared -fPIC -fopenmp -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 86 88 87 DLL_PATH = tempfile.gettempdir() 89 # Assume the default location of module DLLs is within the sasmodel directory. 90 DLL_PATH = os.path.join(os.path.split(os.path.realpath(__file__))[0], "models", "dll") 88 91 89 92 ALLOW_SINGLE_PRECISION_DLLS = True … … 103 106 basename += "128" 104 107 return joinpath(DLL_PATH, basename+'.so') 105 106 108 107 109 def make_dll(source, model_info, dtype="double"): … … 143 145 source_files = generate.model_sources(model_info) + [model_info['filename']] 144 146 dll = dll_path(model_info, dtype) 145 newest = max(os.path.getmtime(f) for f in source_files) 146 if not os.path.exists(dll) or os.path.getmtime(dll) < newest: 147 148 #newest = max(os.path.getmtime(f) for f in source_files) 149 #if not os.path.exists(dll) or os.path.getmtime(dll) < newest: 150 if not os.path.exists(dll): 147 151 # Replace with a proper temp file 148 152 fid, filename = tempfile.mkstemp(suffix=".c", prefix=tempfile_prefix) -
setup.py
rf903f0a r381b1f0 1 import os 1 2 from setuptools import setup,find_packages 3 4 # Create the model .so's 5 os.system("python gen_so.py") 2 6 3 7 packages = find_packages(exclude=['contrib', 'docs', 'tests*']) … … 5 9 'sasmodels.models': ['*.c','lib/*.c'], 6 10 'sasmodels': ['*.c'], 11 'sasmodels.models.dll': ['*.so'], 7 12 } 8 13 required = []
Note: See TracChangeset
for help on using the changeset viewer.