Changeset 1a3559f in sasmodels
- Timestamp:
- Jul 17, 2018 9:28:57 AM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- af7a97c
- Parents:
- b9c19aa2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kerneldll.py
r33969b6 r1a3559f 99 99 pass 100 100 # pylint: enable=unused-import 101 102 if "SAS_DLL_PATH" in os.environ: 103 SAS_DLL_PATH = os.environ["SAS_DLL_PATH"] 104 else: 105 # Assume the default location of module DLLs is in .sasmodels/compiled_models. 106 SAS_DLL_PATH = os.path.join(os.path.expanduser("~"), ".sasmodels", "compiled_models") 101 107 102 108 if "SAS_COMPILER" in os.environ: … … 161 167 return CC + [source, "-o", output, "-lm"] 162 168 163 # Assume the default location of module DLLs is in .sasmodels/compiled_models.164 DLL_PATH = os.path.join(os.path.expanduser("~"), ".sasmodels", "compiled_models")165 166 169 ALLOW_SINGLE_PRECISION_DLLS = True 167 170 … … 200 203 return path 201 204 202 return joinpath( DLL_PATH, basename)205 return joinpath(SAS_DLL_PATH, basename) 203 206 204 207 … … 209 212 exist yet if it hasn't been compiled. 210 213 """ 211 return os.path.join( DLL_PATH, dll_name(model_info, dtype))214 return os.path.join(SAS_DLL_PATH, dll_name(model_info, dtype)) 212 215 213 216 … … 228 231 models are not allowed as DLLs. 229 232 230 Set *sasmodels.kerneldll.DLL_PATH* to the compiled dll output path. 233 Set *sasmodels.kerneldll.SAS_DLL_PATH* to the compiled dll output path. 234 Alternatively, set the environment variable *SAS_DLL_PATH*. 231 235 The default is in ~/.sasmodels/compiled_models. 232 236 """ … … 247 251 if need_recompile: 248 252 # Make sure the DLL path exists 249 if not os.path.exists( DLL_PATH):250 os.makedirs( DLL_PATH)253 if not os.path.exists(SAS_DLL_PATH): 254 os.makedirs(SAS_DLL_PATH) 251 255 basename = splitext(os.path.basename(dll))[0] + "_" 252 256 system_fd, filename = tempfile.mkstemp(suffix=".c", prefix=basename)
Note: See TracChangeset
for help on using the changeset viewer.