Changeset e1454ab in sasmodels
- Timestamp:
- Apr 25, 2016 9:46:46 AM (9 years ago)
- 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
- Parents:
- 81cd2a2
- git-author:
- Piotr Rozyczko <piotr.rozyczko@…> (04/14/16 05:44:48)
- git-committer:
- Piotr Rozyczko <piotr.rozyczko@…> (04/25/16 09:46:46)
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kerneldll.py
r4d76711 re1454ab 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 re1454ab 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.